Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2003
    Location
    Pakistan
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    eror in this program

    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

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <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>
    Check out the Forum Search. It's the short path to getting great results from this forum.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •