mui back 返回刷新頁面的實(shí)例
更新時(shí)間:2017年12月06日 16:34:59 作者:雪狼之夜
下面小編就為大家分享一篇mui back 返回刷新頁面的實(shí)例,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧
2個(gè)頁面 模擬
1.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link href="../../css/mui.min.css" rel="external nofollow" rel="external nofollow" rel="stylesheet" />
<script src="../../../js/mui.min.js"></script>
</head>
<body>
<script type="text/javascript" charset="utf-8">
mui.init()
mui.plusReady(function(){
alert('1')
// var self=plus.webview.currentWebview();
// console.log(JSON.stringify(self))
mui("body").on("tap",".a",function(){
mui.openWindow({
url:"2.html",
id:"a2",
})
})
});
</script>
<a href="javascript:void(0)" rel="external nofollow" rel="external nofollow" class="a">跳到a2</a>
</body>
</html>
2.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link href="../../css/mui.min.css" rel="external nofollow" rel="external nofollow" rel="stylesheet" />
<script src="../../../js/mui.min.js"></script>
</head>
<body>
<script type="text/javascript" charset="utf-8">
mui.init()
mui.plusReady(function(){
// var self=plus.webview.currentWebview();
// console.log(JSON.stringify(self))
var old_back = mui.back;
mui.back = function() {
var wobj = plus.webview.getWebviewById("HBuilder");//注意 HBuilder 是 1.html 的 ID 你如果1.html 有ID 要替換掉HBuilder,
wobj.reload(true);
old_back()
}
});
</script>
<a href="javascript:void(0)" rel="external nofollow" rel="external nofollow" class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left">返回刷新</a>
</body>
</html>
以上這篇mui back 返回刷新頁面的實(shí)例就是小編分享給大家的全部?jī)?nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。
相關(guān)文章
js的math中缺少的數(shù)學(xué)方法小結(jié)
JavaScript?Math對(duì)象包含一些真正有用且強(qiáng)大的數(shù)學(xué)運(yùn)算,但它缺乏大多數(shù)其他語言提供的許多重要運(yùn)算,例如求和,乘積,奇數(shù)和偶數(shù)等等,本文就來介紹一下2023-08-08
基于JavaScript實(shí)現(xiàn)游戲購物車效果詳解
這篇文章主要介紹了如何利用JavaScript實(shí)現(xiàn)游戲購物車效果,文中的實(shí)現(xiàn)代碼講解詳細(xì),對(duì)我們學(xué)習(xí)JavaScript有一定幫助,需要的可以參考一下2022-03-03
BootStrap表單控件之復(fù)選框checkbox和單選擇按鈕radio
這篇文章主要介紹了BootStrap表單控件之復(fù)選框checkbox和單選擇按鈕radio的相關(guān)資料,需要的朋友可以參考下2017-05-05

