28 lines
578 B
HTML
28 lines
578 B
HTML
<html>
|
|
|
|
<head>
|
|
<title>Number Play</title>
|
|
<!--
|
|
Andres Delikat
|
|
Web page programming assignment 12
|
|
|
|
Use my javascript library functions to ask the user for a number and display it and its square.
|
|
-->
|
|
|
|
<script type="text/javascript" src="myLib.js"></script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
<script language= "javascript" type="text/javascript">
|
|
|
|
var number = getNum("Please enter a number")
|
|
var result = calcSquare(number)
|
|
document.write("You entered: ", number, ".<br>")
|
|
document.write("The square of ", number, " is ", result, ".<br>")
|
|
|
|
</script>
|
|
</body>
|
|
|
|
</html>
|