<script> function createTable(rows,lines){ this.rows=rows; this.lines=lines; var Body=document.getElementById('body'); var Table=document.createElement('table'); Table.setAttribute('border',1); for(var i=0;i<this.rows;i++){ var row=Table.insertRow(i); for(var j=0;j<this.lines;j++){ var cells=row.insertCell(j); cells.innerHTML=i+','+j } } Body.appendChild(Table);