<script type="text/javascript" language="javascript">
        var lb=window.dialogArguments.window.document.getElementById("scriptstring");
        var oOld=lb.getElementsByTagName("script")[0];
        alert(oOld.parentNode.tagName);
        alert(oOld.tagName);
        oOld.parentNode.removeChild(oOld);
</script>
这段代码嵌入在一个showModalDialog页面中
当这个页面被运行的时候 父页面有一个id为scriptstring的label
我现在要删除这个label当中的一段js代码 现在 alert(oOld.parentNode.tagName); alert(oOld.tagName);
已经显示能找到这两个node的对象了 但是用removeChild方法后 父页面的label内 原来那段js还是存在 这到底为啥??
下面是父页面的lable
<label id="scriptstring">
<script language='javascript'type='text/javascript'>var arguemnts = new Object();arguemnts.window = window;window.showModalDialog ('UptAdv.aspx?ID=12', arguemnts, 'dialogHeight=410px;dialogWidth=820px;status=no;resizable=no;scroll=no');</script>
</label>