Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
David
need help on a nested Javascript table?
I've got a table for a nested function, the multiplication table. Before the nested function goes into a table it works fine... however,when it goes into the table, it comes out as table * n and not the values. Can any help on where the program is going wrong?
<html>
<head>
<title>Multiplication chart</title>
</head>
<body>
<h1> Multiplication Table </h1>
<script language="JavaScript">
<-
var n
var table
n=1
table=1
document.write('<table border="10" cellspacing="1" cellpadding="5">')
for (table=1; table<=6; table++)
{
document.write('<tr>')
for (n=1; n<=10; n++)
{
document.write('<td> (table * n) </td>')
}
document.write('</tr>')
}
document.write('</table>')
</script>
</body>
</html>
4 AnswersProgramming & Design1 decade ago