Friday, 1 August 2014

Addition of two numbers using html and java script


Addition of two numbers using html and java script

 <html>
<head>
<title>Add
</title>
<script type="text/javascript">
function addition()
{
     var a=25;
     var b=39;
     document.f1.result.value=a+b;
}
</script>
</head>
<body>

<form name="f1">


sum<input type="text" name="result">
<input type="button" value="submit" onClick="addition()">
</form>
</body>
</html>



No comments: