x
<html>
<body>
<p id="mathGen"></p>
<input type="text" id="num1" />
<input type="text" id="num2" />
<button onclick="getPow()">Power number</button>
<script>
function getPow(){
var x = document.getElementById("num1").value;
var y = document.getElementById("num2").value;
document.getElementById("mathGen").innerHTML = Math.pow(x, y);
}
</script>
</body>
</html>
Comments
No comments have been made yet.
Please login to leave a comment. Login now