解决方案 »

  1.   

     <div id="m1" onMouseOver="mcancelclosetime('m1')" onMouseOut="mclosetime()"> 如果是使用nextSibling或者previousSibling属性,注意非IE浏览器下空白节点也算一个,自己注意判断nodeType
      

  2.   

    <div id="m1" onMouseOver="mcancelclosetime('m1')" onMouseOut="mclosetime()"> 
    var child_to_father = document.getElementById(child_id);
        var oa = child_to_father.parentNode.getElementsByTagName('a');
        oa[0].style.background = color.yellow;
        oa[0].style.color = color.black;