最新回答 / Web程序媛
function showDiv1(obj){ var x = obj.parentNode; var y = x.nextSibling; alert(x.nodeName); //弹出p节点 alert(y.nodeName); // 弹出#text节点 y.style.display = "block"; x.style.display = "none"; }
2018-01-23
最新回答 / 食梦者3711585
你把nextSibling换成nextElementSibling,把previousSibling换成previousElementSibling试试
2017-04-30