...

View Full Version : eror in this program



hassanshaikh19
06-02-2003, 01:51 PM
i want this program rows and coloms i mean "table" i m really dont know what can i do?\

<html>
<body>
<table border=1>
<script>
function tabl(n,c)
{
var a="<tr></tr>"
var b="<td></td>"
for (5:49 AM 6/2/2003a=0;a<n; a++)
{
for (b=0; b<n; b++)
{
document.write("<table border=7>")
document.write("<tr>"+"<td>"+"</tr>"+"</td></table>")
}
}
}
n=parseInt(prompt("enter the row number",""));
c=parseInt(prompt("enter the colom number",""));
tabl(n,c)
</script>
</table>
</body></html>

tell me what can i do

Roy Sinclair
06-02-2003, 09:06 PM
<html>
<body>
<table border=1>
<script>
function tabl(n,c)
{
for (var a=0;a<n; a++)
{
document.write("<tr>")
for (var b=0; b<n; b++)
{
document.write("<td></td>")
}
document.write("</tr>")
}
}
n=parseInt(prompt("enter the row number",""));
c=parseInt(prompt("enter the colom number",""));
tabl(n,c)
</script>
</table>
</body>
</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum