Suppose you have a Web server control called TextBox in your Web page:
You can access this value in a couple ways using JavaScript:
-
document.getElementById('<%=Test.ClientID%>').value;ClientID - server control identifier generated by ASP.NET
-
document.forms[0]['Test'].value;