I have a two input textbox and one input submit button
i want to submit these data on click event of button using javascript,
and javascript fuction fired two times over single click of button
<head>
<title>JAVA SCRIPT</title>
<script>
function fun() {
var txt1 = parseInt(document.getElementById("x").value);
var txt2 = parseInt(document.getElementById("y").value);
alert("Text 1 + text 2 is " + parseInt(txt1 + txt2));
}
</script>
</head>
<body>
<div>
<table style="width: 500px;">
<tr>
<td>
<input type="text" id="x" />
</td>
<td>
<input runat="server" type="text" id="y" />
</td>
</tr>
<tr>
<td colspan="2">
<input id="Button1" type="button" value="button" onclick="return fun()" />
</td>
</tr>
</table>
</div>
</body>