为什么这个代码一提交就卡了
//前一个节点
function get_previousSibling(n){
var a=n.previousSibling;
while (a && a.nodeType!=1){
a=n.previousSibling;
}
return a;
}
var a = document.getElementsByTagName("li")[4];
document.write(a.nodeName);
document.write(" = ");
document.write(a.innerHTML);
var b = get_previousSibling(a);
if(b!=null){
document.write("<br />presibling: ");
document.write(b.nodeName);
document.write(" = ");
document.write(b.innerHTML+'<br>');
}