的iFrame在jQuery Mobile的应用程序导致错误:Unsafe JavaScript attempt to access frame with URL file:///D:/xx/webpage.html from frame with URL http://www.asp.net/. Domains, protocols and ports must match.
的iFrame在jQuery Mobile的应用程序导致错误
我正在开发使用iframe来加载外部网站jQuery的移动应用程序。
我的脚本代码是:
$(document).ready(function() {
$('#divID').prepend('<img src="http://xxx/images/ICPosternew1002.png" usemap="#map" id="image" style="margin-top:43px;"/>')
$('#map').append('<area coords="30,0,60,30" id="1" alt="Blah" title="asp" />')
$("#1").bind("click", function (e) {
e.preventDefault();
$('#Web1').append('<form id="form1" runat="server" rel="external"></form>')
$('#form1').append('<iframe id="iframe1" src="http://asp.net" frameborder="0" rel="external"></iframe>')
});
});
我在我的应用程序的两个虚拟页。点击主页上的图像地图后,加载第二页与iFrame和相应的网站。
<div data-role="page" id="Web" class="pagebody">
<div data-role="header" data-position="inline" data-theme="a">
<!--header-->
</div>
<div data-role="content" id="Web1">
<form id="form1" runat="server">
<iframe id="iframe1" >
</iframe>
</form>
</div>
<div data-role="footer" class="footer">
<!--footer-->
</div>
</div>
这是我的代码问题吗?