Prasad Bolla's SharePoint Blog

Click Here to go through the Interesting posts within my Blog.

Click Here to go through the new posts in my blog.

Thursday, March 29, 2012

Getting a TextBox Value using JQuery


<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Enter Value in TextBox</title>
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function()
{
    $("#btnGetTextBoxValue").click(function()
    {
        alert($("#txtSample").val());
    });
});
</script>
</head>

<body>
<table width="100%" cellpadding="0" cellspacing="0">
<tr><td>Enter Value in TextBox</td><td><input type="text" id="txtSample" /></td></tr>
<tr><td colspan="2" align="center"><input type="button" id="btnGetTextBoxValue" /></td></tr>
</table>
</body>

</html>

No comments:

Post a Comment