About nextSibling, IEnextSibling in IE
<Script> var shq = {} shq. cmenu = function (e) {var e = window. event? Window. event. srcElement: e.tar get; if (/a/I. test (e. tagName) {alert (e. parentNode. nextSibling. nodeType); // 3 text e. parentNode. nextSibling. innerHTML = e. innerHTML; e. blur () ;}</script> <div id = "div1" onclick = "shq. cmenu (event) "> <a href =" # "> features </a> </div> <div id =" div2 "> </div>
System Environment: win8, ie11
Problem: nextSibling fails to get the next node of the current node at the same level.
Process description: When you click [feature], the innerHtml of div2 is not [feature]
During debugging, we found that e. parentNode. nextSibling is not the next div but # text, and nodetype is equal to 3.
My personal conclusion: I don't know, right? The result is as follows.
Div1.nextSibling. nextSibling is div2.