When I click on myButton1
button, I want the value to change to Close Curtain
from Open Curtain
.
HTML:
<
It seems like there is just a simple typo error:
Corrected code:
...
function change()
{
document.getElementById("myButton1").value="Close Curtain";
}
A faster and simpler solution would be to include the code in your button and use the keyword this to access the button.