【发布时间】:2014-07-06 19:25:44
【问题描述】:
jquery 移动应用,如何加载其他域网页
我尝试了 iFrame,但遇到了手机尺寸问题
我尝试了 PHP file_get_contents 页面加载,但内部链接/脚本不起作用
有什么想法吗??
谢谢
这是我的代码
HTML:
<div data-role="header">
<a href="#home" data-role="button" data-inline="true" data-icon="home" >home</a>
<h1>lists</h1>
</div>
<div data-role="content">
<div id="listDetail" style="height:100%;width:100%">
</div>
</div>
JS
var list_url= 'http://lists.php';
$.ajax({
type: 'GET',
data: {area: areaID },
url: list_url,
dataType: 'html',
success: function(result){
$("#listDetail").html(result);
}
});
PHP
echo file_get_contents("http://m.booking.com/searchresults.html?aid=123456&lang=en&lang=en&latitude=55&longitude=56&radius=40");
【问题讨论】:
标签: php jquery ajax jquery-mobile