How to set TextBox value using jQuery..


How to set TextBox value on button click using jQuery..

 
<
head runat="server">

<title></title>

<script src="scripts/jquery.js" type="text/javascript"></script>

<script language="javascript" type="text/javascript">

$(document).ready(function() {

$('#btn1').click(function() {

$('#Abc').val('Clicked')

return false;

});

$('#btn2').click(function() {

$('#Abc').val('Hit')

return false;

});

});

</script>

</head>
<
body>


<form id="form1" runat="server">

<div>

<input name="Abc" id="Abc" runat="server" />
<input type="button" runat="server" value="click" id="btn1" />
<asp:Button ID="btn2" runat="server" Text="Hit" />

</div>

</form>

</
body>
Ebook Download
View all
Learn
View all