错误:HIERARCHY_REQUEST_ERR:DOM 异常 3
我正在尝试为 Google Chrome 开发一个应用程序:打包应用程序
在我的例如,使用命令 $.get
检索 HTML 页面并将其插入当前页面:
Page HTML
<body>
<div id="wrap"></div>
</body>
Script
$.get(url, function(html) {
$("#wrap").html(html);
});
错误发生在线: $("#wrap").html(html);
尝试
搜索互联网,我发现这个问题在 stackoverflow 上,但这对我没有多大帮助。
另一个细节是该示例不是 Chrome Web 应用程序。 同样的示例完美地发布在互联网上:http://ridermansb.kodingen.com/
I'm trying to develop an app for Google Chrome: Packaged Apps
In my apolicação, use the command $.get
to retrieve an HTML page and insert it into the current page:
Page HTML
<body>
<div id="wrap"></div>
</body>
Script
$.get(url, function(html) {
$("#wrap").html(html);
});
The error occurs on the line: $("#wrap").html(html);
Attempts
Searching the internet, I found this question here on stackoverflow, but this did not help me much.
Another detail is that this example is not a Chrome Web App.
This same example, works perfectly posted on the Internet at: http://ridermansb.kodingen.com/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您的响应是 HTML,请尝试在
$.get()
中指定dataType
,如下所示:我在附加来自 jQuery
的响应时遇到了完全相同的问题$.post()
。响应是 HTML,但 jQuery 无法(无论出于何种原因)正确确定数据类型。If your response is HTML, try specifying the
dataType
in the$.get()
like so:I just had exactly the same problem attaching the response from a jQuery
$.post()
. The response is HTML but jQuery could not (for whatever reason) correctly determine the data type.