<div class="loginorreg"><a href="javascript:;" class="left" id="reg">注册账号</a><a href="javascript:;" class="right">忘记密码?</a></div>
<script src="js/mui.min.js"></script>
<script>
(function($, doc) {
$.plusReady(function() {
document.getElementById('reg').addEventListener('tap', function(event) {
$.openWindow({
url: 'reg.html',
id: 'reg',
show: {
aniShow: 'pop-in'
},
styles: {
popGesture: 'hide'
},
waiting: {
autoShow: false
}
});
}, false);
});
})(mui, document));
</script>
这个代码是参照模板的,但是我这儿就是一直转场不成功,为什么?
3 个回复
chender - 与人为善
js有报错吗?
DCloud_UNI_CHB
模板方式是公用父webview,子webview通过loadURL方法加载不同页面,是这种模板方案吗?
望月孤魂
看下reg是不是没有成功注册tap事件。改成doc.getDocumentById("reg")试下。