i need to make this work like it is supposed to pop out a message box containing the answer when i click a cell...
oh and i need to have a super randomized background that relies on Math.ceil(Math.random())... *how the hell would i know how to do this? i'm just a beginner...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style type="text/css">
body {
margin-left: 20%;
margin-right: 20%;
}
h1 {
font-family: jokerman;
text-align: center;
}
td {
border-style: outset;
border-width: 5px;
border-color: gray;
font-family: courier new;
}
td:hover {
border-style: inset;
color:red;
}
</style>
</head>
<body>
<h1>Multiplication Table</h1>
<br /><br /><br />
<script type="text/javascript">
mess = "Please enter the number of rows <1-10>."
do {
x = window.prompt(mess);
x = parseInt(x);
mess = mess + "\nInvalid entry. Please try again."
} while (x<1 || x>10)
mess2 = "Please enter the number of columns <1-10>."
do {
y = window.prompt(mess2);
y = parseInt(y);
mess2 = mess2 + "\nInvalid entry. Please try again."
} while (y<1 || y>10)
document.write("<table>");
for (i=1; i<=x; i++) {
document.write("<tr>");
for (j=1; j<=y; j++) {
document.write("<td>", i, "*", j, "</td>");
onClick="window.alert('i*j')";
}
document.write("</tr>");
}
document.write("</table>");
</script>
</body>
</html>