When I click on myButton1 button, I want the value to change to Close Curtain from Open Curtain.HTML:
myButton1
Close Curtain
Open Curtain
<
There are lots of ways. And this should work too in all browsers and you don't have to use document.getElementById anymore since you're passing the element itself to the function.