gpt4 book ai didi

javascript - 在jquery的类中插入html内容

转载 作者:行者123 更新时间:2023-11-28 21:16:53 27 4
gpt4 key购买 nike

我正在使用 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 内容。

提前致谢

最佳答案

我无法确定问题到底是什么,因为我没有足够的详细信息。

但我可以告诉你如何解决:使用Firebug 。在 Ajax 回调中添加这些语句:

console.log( $(".saveWin .modalCSS") );
console.log(data);

检查 $('.saveWin .modalCSS') 是否显示任何结果。查看 data 的值是多少。

由于它可以在 IE 中运行,所以会发生一些奇怪的事情。使用Firebug调试问题。

干杯:)

关于javascript - 在jquery的类中插入html内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7357755/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com