shmily
10-08-2003, 04:52 PM
My script got some problems. I want to to a table like this :
N 10*N 100*N 1000*N
1 10 100 1000
2 20 200 2000
3 30 300 3000
4 40 400 4000
5 50 500 5000
And it is with border.
Please tell me what wrong it is.
<html>
<head>
<title> Tutorial 3 _ Question 4 </title>
</head>
<SCRIPT language=javascript type=text/javascript>
<!-- Hide javascript from older browsers
N = 1
document.write("<table border = 1>\n" + "<tr><th>N<th>10*N<th>100*N<th>1000*N");
while(N<5)
{ col2 = 10*N, col3 = 100*N, col4 = 1000*N
document.write("<tr><td>"+col2+"</td><td>"+col3+"</td><td>"+col4+"</td></tr>")
N++
}
document.writeIn("</table>");
}
//-->
</script>
<body>
</body>
</html>
N 10*N 100*N 1000*N
1 10 100 1000
2 20 200 2000
3 30 300 3000
4 40 400 4000
5 50 500 5000
And it is with border.
Please tell me what wrong it is.
<html>
<head>
<title> Tutorial 3 _ Question 4 </title>
</head>
<SCRIPT language=javascript type=text/javascript>
<!-- Hide javascript from older browsers
N = 1
document.write("<table border = 1>\n" + "<tr><th>N<th>10*N<th>100*N<th>1000*N");
while(N<5)
{ col2 = 10*N, col3 = 100*N, col4 = 1000*N
document.write("<tr><td>"+col2+"</td><td>"+col3+"</td><td>"+col4+"</td></tr>")
N++
}
document.writeIn("</table>");
}
//-->
</script>
<body>
</body>
</html>