Changing button text onclick

后端 未结 18 2546
野性不改
野性不改 2020-11-27 03:10

When I click on myButton1 button, I want the value to change to Close Curtain from Open Curtain.
HTML:

<         


        
18条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-27 03:57

    You are missing an opening quote on the id= and you have a semi-colon after the function declaration. Also, the input tag does not need a closing tag.

    This works:

    
    
    
    

提交回复
热议问题