function tab(n,m){
document.write("<table border=1>");
for(var i=1;i<=n;i++){
document.write("<tr>");
for(var j=1;j<=m;j++){
document.write("<td>");
document.write(numRandom(1,100));
document.write("</td>");
}
document.write("</tr>");
}
document.write("</table>");
}
btn.onclick = function(){
var rowVal = row.value;
var colVal = col.value;
tab(rowVal,colVal);
}
原文地址:https://www.cnblogs.com/BLOGZR/p/9446279.html
时间: 2024-10-14 09:38:30