<html>
<script>
function createRow(data) {
var row,cell,txtNode;
    row=document.createElement("tr");
    cell=document.createElement("td");
    
    cell.setAttribute("bgcolor","#FFFAFA");
    cell.setAttribute("border","0");
    
    txtNode=document.createTextNode(data);
    cell.appendChild(txtNode);
    row.appendChild(cell);
    return row;
}
</script>
<body>
<table id="courseData">
    <tbody id="courseDataBody"></tbody>
</table> 
<script>
for(i=1;i<10;i++)
document.getElementById("courseDataBody").appendChild(createRow(i+""));
</script>
</body>
</html>