WORKING OF TEXTBOX
WORKING OF TEXTBOX:-
-In javascipt all textbox accepting data in a form of value.
(input box jab bhi aayega tab getelement mei value lagega)
<html>
<head>
<script language="JavaScript">
function addition()
{
var a,b,c;
a=parseInt(document.getElementById("T1").value);
b=parseInt(document.getElementById("T2").value);
c=a+b;
document.getElementById("T3").value=c;
}
</script>
</head>
<body>
enter first number
<br>
<input type="text" id="T1">
<br>
enter second number
<br>
<input type="text" id="T2">
<br>
result is
<br>
<input type="text" id="T3">
<br>
<button onclick="addition()"> submit </button>
</body>
</html>
Comments
Post a Comment