guowei1000
06-08-2004, 04:49 AM
for (var i = 0; i < level; i++) {
indent = indent + " ";
}
if (node.nodeName == "#text")
{
strContent = strContent + indent + "ChildrennodeText = " + node.text
+ "<br/>";
}
else
{
var check = node.nodeName
strContent = strContent + indent + "<A onClick=javaScript:toogle_state(check)><font color=blue>nodeText = " + node.nodeName + "<br/>";
}
strContent = strContent + "<p>";
}
if (node.firstChild) {
crawl(node.firstChild, level + 1);
}
if (node.nextSibling) {
crawl(node.nextSibling, level);
}
strContent = strContent + "</p>";
}
The code should be longer but i just cut this part out save space :D
i know it loop then check but does the If work?
when i try out the code out every thing turn blue shouldnt it only turn the <font color=blue> into blue? help pls?
indent = indent + " ";
}
if (node.nodeName == "#text")
{
strContent = strContent + indent + "ChildrennodeText = " + node.text
+ "<br/>";
}
else
{
var check = node.nodeName
strContent = strContent + indent + "<A onClick=javaScript:toogle_state(check)><font color=blue>nodeText = " + node.nodeName + "<br/>";
}
strContent = strContent + "<p>";
}
if (node.firstChild) {
crawl(node.firstChild, level + 1);
}
if (node.nextSibling) {
crawl(node.nextSibling, level);
}
strContent = strContent + "</p>";
}
The code should be longer but i just cut this part out save space :D
i know it loop then check but does the If work?
when i try out the code out every thing turn blue shouldnt it only turn the <font color=blue> into blue? help pls?