this help you :
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<br>
<form name="test">
input<br><br>
<input type="number" name="x1" id="x1" style="width:70px"> X *
<input type="number" name="y1" id="y1" style="width:70px"> Y
<br><br>
<input type="button" name="Solve" value="Solve" onclick="myFunction()" ><br>
<br><br>
OutPut =<output type="number" name="x" id="x" style="width:100px"></output> <br><br>
<p id="info"></p>
</form>
<script type="text/javascript">
function myFunction() {
var x1 = document.forms['test']["x1"].value;
var y1 = document.forms['test']["y1"].value;
var x = x1 * y1;
document.getElementById("x").value = x;
document.getElementById("info").innerHTML = "X : " + x1 + " Y : " + y1;
}
</script>
</body>
</html>
0
solved Javascript Document Write X and Y