<html>
<head>
<script type="text/javascript">
var a=eval(prompt("Enter firstnumber:"));
var b=eval(prompt("Enter Secondnumber:"));
function fresult()
{
var c=a+b;
var d=a-b;
var e=a*b;
var f=a/b;
document.write("sum is "+c);
document.write("diff is "+d);
document.write("mul is "+e);
document.write("div is "+f);
}
</script>
</head>
<body>
<form>
<input type ="submit" name="btnsubmit" value="Result" onClick="fresult()">
</form>
</body>
</html>
0 comments:
Post a Comment