function criarTabela(linha,coluna){
var html = "";
html += "<table id=\"tabela\">"
for (var i=1 ; i<=linha ; i++){
html += "<tr>"
for(var x=1; x<=coluna ; x++){
html +="<td>"
html+='Linha ' + i
html +="</td>"
}
html += "</tr>"
}
html += "</table>"
document.write(html);
}
criarTabela(12,3);
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.