<html>
<head>
<title>Mathematical Expression</title>
<script type = "text/javascript">
function math_exp()
{
var x = document.form1.exptext.value;
var result = eval(x);
document.form1.resulttext.value = result;
}
</script>
</head>
<body >
<form name = "form1">
<table>
<tr>
<td>Expression</td>
<td><input type = "text" name = "exptext" /></td>
</tr>
<tr>
<td>Result</td>
<td><input type = "text" name = "resulttext" /></td>
</tr>
<tr>
<td><input type = "button" value = "calculate" onclick = "math_exp()" /></td>
</tr>
</table>
</form>
</body>
</html>
<head>
<title>Mathematical Expression</title>
<script type = "text/javascript">
function math_exp()
{
var x = document.form1.exptext.value;
var result = eval(x);
document.form1.resulttext.value = result;
}
</script>
</head>
<body >
<form name = "form1">
<table>
<tr>
<td>Expression</td>
<td><input type = "text" name = "exptext" /></td>
</tr>
<tr>
<td>Result</td>
<td><input type = "text" name = "resulttext" /></td>
</tr>
<tr>
<td><input type = "button" value = "calculate" onclick = "math_exp()" /></td>
</tr>
</table>
</form>
</body>
</html>
That was very value coding information
ReplyDeletereally helped me
will also share them on my blog
Thanks for sharing
Get trained on digital marketing training with our industrial experts in
seo training in bangalore join us