In the JavaScript script tag, just include the code as below:
<script type="text/javascript">
function show_textbox_value
{
var tbox_value = document.form1.<%= TextBox1.ClientID%>.value;
alert(tbox_value); // alerts the value of TextBox
</script>
}
...
...
...
<body>
<form id="form1" runate="server">
<asp:TextBox ID="TextBox1" runat="server ></asp:TextBox>
</form>
</body>
The above sample alerts the value inside the TextBox, when the function show_textbox_value(), is called.
No comments:
Post a Comment