In your goStore()
function, update the onclick
property for each button to run buyHealth
, buyWeapon
, and goTown
, respectively.
how can i do this please
In your goStore()
function, update the onclick
property for each button to run buyHealth
, buyWeapon
, and goTown
, respectively.
how can i do this please
if you have an element saved in a variable myButton
you can update the onclick
property to run a function func
writing myButton.onclick = func
thank you
it was helpful
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.