首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

javascript当中removeChild的用法

例 1.5(removeChild()IEFF.html) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <head>     <meta http-equiv="content-type" content="text/html; charset=utf-8"/> </HEAD> <BODY>

<script> /*马克-to-win: DIV object: Inherits from Element object,  Element object Inherits from Node object  b 是个 DIV object.     */ var b = document.getElementById("b"); var c = b.parentNode; /*Node.removeChild() (Method) A method for removing child nodes from the collection. Property/method value type: Node object JavaScript syntax: - myNode.removeChild(aNode) Argument list: aNode The node object to be removed */ var cs=document.getElementById("contain"); alert("c===cs is "+(c===cs)); c.removeChild(b); </script> </BODY> </HTML>

05
领券