<div role="main" class="ui-content">
<p>First check if the 'About us' page is in the DOM, Load the page in the DOM and check again</p>
<input type="button" id="domcheck" data-inline="true" value="Is 'About us' in the DOM?"/>
<input type="button" id="loadpage" data-inline="true" value="Load the 'About us' page"/><br />
<div id="myResult">'About Us' is in the DOM: <span id="result">The result will be displayed here</span></div>
</div>
<script>
$( "#domcheck" ).on( "click", function() {
var check = $( "#aboutUs" ).length === 1;
$( "#result" ).text( check );
});
$( "#loadpage" ).on( "click", function() {
console.log("load out.html")
$.mobile.loadPage("external.html");
//$( ":mobile-pagecontainer" ).pagecontainer( "load", "external.html");
});
直接学官网的例子,只是把要加载的页面改成了自己定义的页面,内容也就是一行字。
点击按钮之后完全没显示。
在firebug界面又能看到的确是成功取到了external页面的数据,但是DOM里面没有反映。弱问原因。。
--
修改:lokta FROM 106.32.70.*
FROM 106.32.70.*