<html>
<head>
<script language="JavaScript">
function display(name,m1,m2)
{
var total;
total=parseInt(m1)+ parseInt(m2);
document.write(name + "<br>" + total );
}
</script>
</head>
<body>
enter your name : <input type="text" id="t1"> <br>
enter your m1: <input type="text" id="t2"> <br>
enter your m2: <input type="text" id="t3"> <br>
<input type="button" value="submit" onclick="display(document.getElementById('t1').value , document.getElementById('t2').value , document.getElementById('t3').value , )">
</body>
</html>
No comments:
Post a Comment