Creating a simple multiplication table

后端 未结 1 966
长发绾君心
长发绾君心 2020-12-22 05:48

Here\'s the code i\'ve written, which is included in a HTML document:



        
相关标签:
1条回答
  • 2020-12-22 06:11

    Change it to this:

    js

    var cipars = 10;
    var i =0;
    document.write('<table border="1" cellspacing="0" id="Tabula">');
    for (i=1; i<10; i++) {
        document.write("<tr>");
    for (j=1; j<10; j++) {
        document.write("<td>" + i + " x " + j + " = " + j*i + "</td>");    
    }
       document.write("</tr>");            
    }
    document.write("</table>");
    
    0 讨论(0)
提交回复
热议问题