2020
09-28
09-28
JavaScript变量Dom对象的所有属性
DOM对象的HTML:<button>DisableState</buttom>1,遍历DOM对象所具有的属性(全部,不管是否在HTMLtag中是否设置)<!DOCTYPEhtml><html><body><buttonid="btnToggleState"onclick="toggleStateManagement()">DisableState</button></body><script>varobj=document.getElementById("btnToggleState");vars="";for(vareleminobj){s+=elem+"\n";}alert(s);</script></html>结果:2.遍...
继续阅读 >