FF下提示Node cannot be inserted

在搜索下面代码的时候

top.document.appendChild(popupContact); 

提示"Node cannot be inserted at the specified point in the hierarchy"  code: "3".求助google得到大概意思是,不允许插入节点.

在FF下,不应该对document添加子节点,应该向body.代码相应修改为

top.document.body.appendChild(popupContact); 

另外,jQuery下面的代码在iframe下运行不正常

$("form").append(popupContact);

需要修改为

$("body").append(popupContact);

Tag标签: JS FF
发表于 2010-02-03 23:59:12 收藏 所属分类: Javascript 网摘收藏
相关文章: