<html>
<head>
<script>
function calculate()
{
var base = document.getElementById("base").value;
var exponent = document.getElementById("exponent").value;
var result = Math.pow(base, exponent);
document.getElementById("output").innerHTML = "The result is " + result;
}
</script>
</head>
<body>
<h1>base and exponent using math.pow</h1>
<input id="base" placeholder="Enter the base"> <br><br>
<input id="exponent" placeholder=”Enter the exponent”><br><br>
<button onclick"calculate()">Submit</button>
<p id="output"></p>
</body>
</html>