/*
Javascript Essentials
by Jason J. Manger
Publisher: Mcgraw-Hill Osborne Media;
ISBN: 0078822343
*/
<!--
Program 3-3
-->
<html>
<head>
<script language="JavaScript">
<!--
function TimesTable(number) {
var thisLoop = 1;
document.writeln("Times Table for: <b>" +
number + "</b><hr><pre>");
while (thisLoop <= 12) {
document.writeln(thisLoop + " x " +
number + " = " + (thisLoop * number));
thisLoop++;
}
document.writeln("</pre>");
}
TimesTable(prompt("Enter a number",10));
//-->
</script>
</head>
</html>
|