Y el código fuente que corresponde con esta ventana es el que aparece en el Código fuente 94.
<HTML>
<HEAD>
<TITLE>Construcción de Tablas mediante DOM</TITLE>
</HEAD>
<BODY ID="bodyNode">
<SCRIPT LANGUAGE="JavaScript">
<!--
Fila1Columna1Obj = document.createTextNode("Fila 1, Columna 1 ");
tableObj = document.createElement("TABLE");
tbodyObj = document.createElement("TBODY");
tr1Obj = document.createElement("TR");
tr1td1Obj = document.createElement("TD");
tr1td2Obj = tr1td1Obj.cloneNode(false);
tr2td1Obj = tr1td1Obj.cloneNode(false);
tr2td2Obj = tr1td1Obj.cloneNode(false);
tr3td1Obj = tr1td1Obj.cloneNode(false);
tr3td2Obj = tr1td1Obj.cloneNode(false);
tr2Obj = tr1Obj.cloneNode(false);
tr3Obj = tr1Obj.cloneNode(false);
Fila1Columna2Obj = Fila1Columna1Obj.cloneNode(false);
Fila2Columna1Obj = Fila1Columna1Obj.cloneNode(false);
Fila2Columna2Obj = Fila1Columna1Obj.cloneNode(false);
Fila3Columna1Obj = Fila1Columna1Obj.cloneNode(false);
Fila3Columna2Obj = Fila1Columna1Obj.cloneNode(false);
Fila1Columna2Obj.nodeValue = "Fila 1, Columna 2 ";
Fila2Columna1Obj.nodeValue = "Fila 2, Columna 1 ";
Fila2Columna2Obj.nodeValue = "Fila 2, Columna 2 ";
Fila3Columna1Obj.nodeValue = "Fila 3, Columna 1 ";
Fila3Columna2Obj.nodeValue = "Fila 3, Columna 2 ";
returnValue = tableObj.insertBefore(tbodyObj);
tbodyObj.insertBefore(tr3Obj);
tbodyObj.insertBefore(tr2Obj, tr3Obj);
tbodyObj.insertBefore(tr1Obj, tr2Obj);
tr1Obj.insertBefore(tr1td2Obj);
tr1Obj.insertBefore(tr1td1Obj, tr1td2Obj);
tr2Obj.insertBefore(tr2td2Obj);
tr2Obj.insertBefore(tr2td1Obj, tr2td2Obj);
tr3Obj.insertBefore(tr3td2Obj);
tr3Obj.insertBefore(tr3td1Obj, tr3td2Obj);
tr1td2Obj.insertBefore(Fila1Columna2Obj);
tr1td1Obj.insertBefore(Fila1Columna1Obj);
tr2td2Obj.insertBefore(Fila2Columna2Obj);
tr2td1Obj.insertBefore(Fila2Columna1Obj);
tr3td2Obj.insertBefore(Fila3Columna2Obj);
tr3td1Obj.insertBefore(Fila3Columna1Obj);
bodyNode.insertBefore(tableObj);
// -->
</SCRIPT>
</BODY>
</HTML>
Código fuente 94
No hay comentarios:
Publicar un comentario