如何实现当再次单击时二级导航条隐藏起来window.onload=function(){ var aLi=document.getElementsByTagName('li'); for(var i=0; i<aLi.length; i++) { aLi[i].onclick = function () { var aChild = this.getElementsByTagName("ul")[0]; if (aChild.className = "dropdown-menu") { aChild.className = ""; } else { aChild.className = "dropdown-menu"; } } }}
添加回答
举报
0/150
提交
取消