function getTable(tr,td){ var num=1; document.write('<table border="1" width="600px">') //var tr=10; for(var i=1;i<=tr;i++){ document.write('<tr>') // var td=10 for(var j=1;j<=td;j++){ document.write('<td>'+num+'</td>') } document.write('</tr>') } } getTable(20,20);
标签:write,20,表格,10,JS,龙龙,var,document From: https://www.cnblogs.com/tomcat2022/p/17299928.html