I'm new to web programming. I have tried to draw a table row with JavaScript but it's not working and I don't' know why.
here's the code
<div id="gameDiv"> </div>
<script type="text/javascript">
public function drawGame(){
var table = document.createElement('table');
table.setAttribute('style','float:left');
var startRow = table.insertRow(0);
var c = 'A'
for (j=0; j<8; j++) {
var text = document.createTextNode(c++);
var cell = startRow.insertCell(j);
cell.appendChild(text);
}
document.getElementById("gameDiv").appendChild(table);
}
$(document).ready(function() {
drawGame();
};
</script>