You can easily create Popup Boxes using JavaScript. Many developers and designers use them to interact with the user in three different ways:
Alert Box
Prompt Box
Confirm Box
<html>
<head><title>www.techterabyte.com javascript sample</title></head>
<script>
<!-- <script> tag is used to insert JavaScript into html document. -->
function multiplyNum(n) {
var i, mul = 1; // variable declaration
// loop to multiply numbers
for (i = 5; i <= n; i++) {
mul = mul*i;
}
// this will print the multiplication of numbers from number 5
alert("The multiplication of digits from 5 to "+ n + " is:\n\n\t " + mul);
}
</script>
<body>
<p style="font-weight: bold;">
www.techterabyte.com<br />
...Multiplication of numbers...</p>
<form name="MultiplicationForm">
Multiplication of the digits from 5 to
<input name="enterNum" type="text" />
<input onclick="multiplyNum(MultiplicationForm.enterNum.value)"
type="button" value="CalculateResult" />
</form>
</body>
</html>