<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Multiply</title>
<style>
* { text-align:center; }
input { width:40px; }
</style>
<script>
function getOp()
{
var e = document.getElementById("Select1");
return e.options[e.selectedIndex].value;
}
function getresult()
{
n1 = document.getElementById('num1').value;
n2 = document.getElementById('num2').value;
n0 = 0;
switch(getOp()) {
case "+":
n0 = parseInt(n1) + parseInt(n2);
break;
case "-":
n0 = n1 - n2;
break;
case ":":
n0 = n1 / n2;
break;
case "x":
n0 = n1 * n2;
break;
}
document.getElementById('result').innerHTML = n0;
}
</script>
</head>
<body>
<p>Multiply Page</p>
<input id="num1" type="number">
<select id="Select1">
<option selected="" value="+">+</option>
<option value="-">-</option>
<option value=":">:</option>
<option value="x">x</option>
</select>
<input id="num2" type="number">
<input name="bt1" type="button" value="=" onclick="getresult()">
<span id="result"></span>
</body>
</html>