从index.html进入list.html:
<button id="btn" type="button">go to list.html</button>
<script type="text/javascript" charset="utf-8">
mui.init();
document.getElementById("btn").addEventListener('tap', function(e) {
e.preventDefault();
if (mui.os.plus) {
mui.openWindow({
url: 'list.html',
id: 'list',
show: {
aniShow: "slide-in-right"
}
});
} else {
location.href = 'list.html';
}
});
</script>
从list.html回退
<button id="btn" type="button">back to index.html</span>
<script type="text/javascript" charset="utf-8">
mui.init();
document.getElementById("btn").addEventListener('tap', function() {
try {
mui.back();
} catch (e) {
alert(JSON.stringify(e))
}
});
</script>
BUG:点击back to index.html,没有反应。
上面的try catch 报如下错误:
查了一下是mui.js(2.4.0) 2443行出错
完整的代码,见附近