<!DOCTYPEhtml><meta charset=utf-8><title><font> with alternating attributes and a character between each tag 4000 in innerHTML inside 20 divs</title>
<script>
// Any copyright is dedicated to the Public Domain.
// http://creativecommons.org/publicdomain/zero/1.0/
function count() { var depth = 0; var deepest = 0; var current = document; var next = null;
outer: for (;;) {
if ((next = current.firstChild)) {
depth++;
if (depth > deepest) {
deepest = depth;
}
current = next;
continue;
}
for (;;) {
if ((next = current.nextSibling)) {
current = next;
break;
}
current = current.parentNode;
depth--;
if (current == document) {
break outer;
}
}
}
varh1 = document.getElementsByTagName("h1")[0]; var p = document.createElement("p"); var t = document.createTextNode("Actual depth (including text leaves): " + deepest);
p.appendChild(t); h1.parentNode.insertBefore(p, h1.nextSibling);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.