Page

Find the square value using java script

<html>
<head>
<script>
function square()
{
a = prompt("enter a number","");
sqr = a*a;
document.write("Squaare of number is " +sqr);
}
</script>
</head>
<body>
<button onclick="square()">Try it</button>
</body>
</html>

No comments:

Post a Comment