function get_nextSibling(n){ var x=n.nextSibling; while (x && x.nodeType!=1){ x=x.nextSibling; } return x; }x && x.nodeType!=1里面具体是怎么运算的。[x&&(x.nodeType)]!=1这样吗?
5 回答

Caballarii
TA贡献1123条经验 获得超629个赞
&&代表and运算,x && x.nodeType!=1是(x) && (x.nodeType!=1),当两个括号里条件都成立时才为真。
&才是与运算
添加回答
举报
0/150
提交
取消