mui如何在界面引入外部页面,实现上拉加载,加载新的外部界面?
<div id="pullrefresh" class="mui-content mui-scroll-wrapper" style="z-index: 1;">
<div class="mui-scroll" style="height: 100%;">
<div class="mui-iframe-wrapper" style="height: 100%;">
<iframe src="qianru.html" id="qianru" style="z-index: -1;"></iframe>
</div>
</div>
</div>
mui.init({
pullRefresh: {
container: "#pullrefresh",
//下拉刷新
down: {
contentdown: "下拉可以刷新",
contentover: "释放立即刷新",
contentrefresh: "正在刷新...",
callback: downFn
},
// 上拉加载
up: {
contentrefresh: "正在加载...",
contentnomore: '没有更多数据了',
callback: upFn
}
}
});
// 下拉刷新函数
function downFn() {
alert("下拉刷新");
setTimeout(function() {
mui("#pullrefresh").pullRefresh().refresh(true);
}, 3000);
}
// 上拉加载函数
function upFn() {
alert("上拉加载");
var _this = this;
_this.endPullupToRefresh(false);
}
0 个回复