How to change the value of an asp:textbox from javascript

前端 未结 4 1205
故里飘歌
故里飘歌 2021-01-06 23:48

I have an asp:textbox


and when a user clicks the \"Cancel\" button, I want to erase w

4条回答
  •  情歌与酒
    2021-01-07 00:32

    When your asp:textbox is rendered to the UI, then yes, it is just an input field of type text. The only part that may be an issue is the ID, but that can be set using ClientIDMode:

    
    

    renders to:

    
    

    and thus the JavaScript you use should work perfectly.

提交回复
热议问题