well i made a multiplication table with the following code:
[code]
<script type=”text/javascript”>
var numRows = parseInt( prompt(“Enter number of rows “, “10”) );
var numCols = parseInt( prompt(“Enter number of columns”, “10”) );
if (isNaN(numRows) || isNaN(numCols)) {
alert(“Rows and columns must be a number”);
}else if (numRows < 1 || numCols < 1) {
alert(“Rows and columns must be greater than zero”);
}else if (numRows * numCols > 10000) {
alert(“Too many rows or columns”);
}else {
var tblHTML = “”, rowHTML;
for (var row = 0; row <= numRows; row++) {
rowHTML = “”;
for (var col = 0; col <= numCols; col++) {
if (row == 0) {
rowHTML += “<td><strong>” +
((col == 0) ? ” ” : col) +
“</strong> </td>”;
} else if (col == 0) {
rowHTML += “<td><strong>” +
row +
“</strong> </td>”;
} else {
rowHTML += “<td>” +
(row * col) +
“</td>”;
}
}
tblHTML += “<tr>” + rowHTML + “</tr>”;
}
document.write(“<table border=”1″>” +
tblHTML +
“</table>”);
}
</script>
but now my assignment calls for me to In stead of storing the numbers 1 thru 12 in an array… store random numbers… create a 12 x 12 multiplication table that recalculates every 10 seconds using a timer. and im allitttle confused. any help would be much apprrreeeciated. thanks guys!