Getting Textbox value in Javascript

前端 未结 6 2087
执念已碎
执念已碎 2020-12-02 00:06

I am trying to get the value of the textbox in a javascript, but its not working. Given below is the code of my test page

<%@ Page Title=\"\" Language=\"V         


        
6条回答
  •  粉色の甜心
    2020-12-02 00:41

    Use

    document.getElementById('<%= txt_model_code.ClientID %>')
    

    instead of

    document.getElementById('txt_model_code')`
    

    Also you can use onClientClick instead of onClick.

提交回复
热议问题