<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>jQuery</title>
</head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#Submit').click(function ()
{
var a =parseInt($('#txtno1').val());
var b =parseInt($('#txtno2').val());
$('#txtresult').val(a+b);
});
});
</script>
<body>
<form id="form1" runat="server">
<div>
</div>
<asp:TextBox ID="txtno1" runat="server"></asp:TextBox>
<asp:TextBox ID="txtno2" runat="server"></asp:TextBox>
<asp:TextBox ID="txtresult" runat="server"></asp:TextBox>
<asp:button ID="Submit" runat="server" text="Button" />
</form>
</body>
</html>
<head runat="server">
<title>jQuery</title>
</head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#Submit').click(function ()
{
var a =parseInt($('#txtno1').val());
var b =parseInt($('#txtno2').val());
$('#txtresult').val(a+b);
});
});
</script>
<body>
<form id="form1" runat="server">
<div>
</div>
<asp:TextBox ID="txtno1" runat="server"></asp:TextBox>
<asp:TextBox ID="txtno2" runat="server"></asp:TextBox>
<asp:TextBox ID="txtresult" runat="server"></asp:TextBox>
<asp:button ID="Submit" runat="server" text="Button" />
</form>
</body>
</html>
No comments:
Post a Comment