错误:HIERARCHY_REQUEST_ERR:DOM异常3 [英] Error: HIERARCHY_REQUEST_ERR: DOM Exception 3
问题描述
我正在为Google Chrome开发应用程序:打包的应用程序
在我的apolicação中,使用命令 $。get
检索HTML页面并将其插入当前page:
页面HTML
<身体GT;
< div id =wrap>< / div>
< / body>
脚本
< pre $ $。get(url,function(html){
$(#wrap)。html(html);
});
错误发生在行上: $(#wrap)。 HTML(html);
尝试
一个href =https://stackoverflow.com/questions/1256394/what-exactly-can-cause-an-hierarchy-request-err-dom-exception-3-error>这个问题在这里在stackoverflow ,但这对我没有多大帮助。
另一个细节是,这个例子不是Chrome Web App。
同样的例子,完美地发布在互联网上: http://ridermansb.kodingen.com/
如果您的回复是HTML,请尝试指定 dataType
$。get()
就像这样:
$。 get(url,function(html){
$(#wrap)。html(html);
},'html');
我只是将jQuery $的响应附加到了相同的问题上。交()
。响应是HTML,但jQuery无法(无论何种原因)正确地确定数据类型。
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/
If your response is HTML, try specifying the dataType
in the $.get()
like so:
$.get(url, function(html) {
$("#wrap").html(html);
}, 'html');
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.
这篇关于错误:HIERARCHY_REQUEST_ERR:DOM异常3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!