I've done the table code, but I do not know how to color the columns.
<script>
window.onload = function tabela(){
var lin = prompt("linha");
lin = parseInt(lin);
var col = prompt("coluna");
col = parseInt(col);
var conteudo = "<table border = 0>";
for (i=1;i<=lin;i++){
conteudo += "<tr>";
for (j=1;j<=col;j++){
conteudo += "<td>" + (i+","+j)+"</td>"
}
conteudo += "</tr>";
}
conteudo += "</table>";
document.getElementById("tab").innerHTML = conteudo;
</script>
</head>
<body>
<div id="tab"></div>
</body>
</html>