what’s wrong with this? The table is not displaying?
[CODE]<head>
<title>Le Tableau SmartLinks en DOM</title>
<script>
function start() {
// récupère une référence vers l’élément body
var mybody = document.getElementsByTagName(“body”)[0];
// création des éléments <table> et <tbody>
smartlinkstable = document.createElement(“table”);
smartlinksTbody = document.createElement(“tbody”);
// création des cellules
for(var j = 0; j < 2; j++) {
// création d’un élément <tr>
ligneSmartLinks = document.createElement(“tr”);
// for(var i = 0; i < 2; i++)
// création d’un élément <td>
celluleSource = document.createElement(“td”);
// création d’un nœud texte
contenuSource = document.createTextNode(“la colonne des Sources);
// ajoute le nœud texte créé à la cellule <td>
celluleSource.appendChild(contenuSource );
// ajoute la cellule <td> à la ligne <tr>
ligneSmartLinks.appendChild(celluleSource);
}
// ajoute la ligne <tr> à l’élément <tbody>
smartlinksBody.appendChild(ligneSmartLinks);
}
// ajoute <tbody> à l’élément <table>
smartlinksTable.appendChild(smartlinksTbody);
// ajoute <table> à l’élément <body>
mybody.appendChild(smartlinksTable);
// définit l’attribut border de mytable à 2;
smartlinksTable.setAttribute(“border”, “2”);
}
</script>
</head>
<body onload=”start()”>
</body>
</html>