?????? RemoveChild(): ?? ??
removeChild() ???? ?? ??? ?? ??? ???? ? ?????.
??:
parent.removeChild(thisNode)
???? ??:
?: delete id= "??" ?? ?? ??? ????:
var thisNode=document.getElementById("demo"); thisNode.parentNode.removeNode(thisNode);
?? ??, ??? ?????:
<div id="demo"> <div id="thisNode">點擊刪除我</div> </div> <script type="text/javascript"> document.getElementById("thisNode").onclick=function(){ this.parentNode.removeChild(this); } </script>
Javascript? ??? ???? ??? ??? ????? ???? ????? ?? ? ? ????.