?<body>? <ul id='ul'> <li>1</li> <li>1</li> <li>1</li>? </ul>? <script>? function clearText(){ var UL = document.getElementById('ul'); var li1 = UL.firstChild; document.write(UL.childNodes.length); UL.removeChild(UL.firstChild); document.write(UL.childNodes.length); ?? } ? </script>? <button onclick="clearText()">清除節(jié)點內(nèi)容</button>?</body>當點擊按鈕是說沒有權(quán)限
js錯誤沒有權(quán)限
武林高手
2015-08-14 21:23:10