JS gevorderde |
|
Zoiets dan:
var rows,columns, i, j, html;
while(rows < 1) rows = prompt("Rows:", '');
while(columns < 1) columns = prompt("Columns:", '');
html = "<table>";
for (i=1; i<=rows; i++) {
html += "<tr>";
for (j=1; j<=columns; j++) {
html += "<td></td>";
}
html += "</tr>";
}
html += "</table>";
document.getElementById('iframe').contentWindow.document.body.innerHTML += html;
var rows,columns, i, j, html; while(rows < 1) rows = prompt("Rows:", ''); while(columns < 1) columns = prompt("Columns:", ''); html = "<table>"; for (i=1; i<=rows; i++) { html += "<tr>"; for (j=1; j<=columns; j++) { html += "<td></td>"; } html += "</tr>"; } html += "</table>"; document.getElementById('iframe').contentWindow.document.body.innerHTML += html;
|