x
<html>
<body>
<p id="mathGen"></p>
<input type="text" id="num" />
<button onclick="getSqrt()">Square Root number</button>
<script>
function getSqrt(){
var x = document.getElementById("num").value;
document.getElementById("mathGen").innerHTML = Math.sqrt(x);
}
</script>
</body>
</html>
Comments
No comments have been made yet.
Please login to leave a comment. Login now