页面切换(多页模式使用)
牛刀小试
页面切换app.load
页面切换app.loadWithUrl
屏幕旋转
示例代码
$("#btnAppLoad").tap(function(){
app.load({
url : "modules/api/page/load.html",
params : {
btnInfo:'app.load示例',
fromBtn:'btnAppLoad'
}
});
});
$("#btnAppLoadWithUrl").tap(function(){
app.loadWithUrl( "modules/api/page/load.html", {
btnInfo:'app.loadWithUrl示例',
fromBtn:'btnAppLoadWithUrl'
});
});
$("#btnRotation").tap(function(e){
app.rotation("landscape");
app.hint("5秒后恢复竖屏");
setTimeout(function(res){
app.rotation("portrait");
},5000);
});