【发布时间】:2011-09-09 06:09:56
【问题描述】:
我正在使用 jquery 插入 html 内容,例如,
$.get("_html/saveme.html", function(data){
$(".saveWin .modalCSS").html(data); //Error here
});
在 Firefox 中,它给了我错误,
Node cannot be inserted at the specified point in the hierarchy
在 IE 中它工作正常。 请建议我,有没有其他方法可以在类中调用类并插入html内容。
提前致谢
【问题讨论】:
-
在我看来,您正试图通过 jQuery 中的双类搜索将 HTML 插入(至少)两个可能的元素中。你的 HTML 是什么样的?
-
需要放置容器的一些 html 和 markuyp
-
看起来像这样的选择器
".saveWin .modalCSS"找不到元素。已经问过同样的问题,问题是 - 没有元素。 stackoverflow.com/questions/1119211/… -
data到底是什么?如果它是一个完整的网页,那么您可能无法将其插入现有网页的中间。您只需要正文中的有效标签? -
在数据中,我有 li 标签。我提醒它并在 Firefox 中以 [object XMLDocument] 形式获取数据,但在 IE 中获取完整的 html 内容
标签: javascript jquery