H5完整代码如下,点击可以弹出alert,并且最终会进入success回调方法,但是页面跳转没有反应?
另外,再请问A小程序web-view的H5,能否跳转到另外一个小程序呢?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1"/>
<script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
</head>
<body>
<button id="app">click</button>
<div id="error"></div>
<script>
var app = document.getElementById('app');
var error = document.getElementById('error');
app.onclick = function() {
alert(app)
wx.miniProgram.navigateTo({
path: '/pages/setting/index',
success: function() {
error.innerText = "success";
},
error: function(err) {
error.innerText = err;
}
});
};
</script>
</body>
</html>
同问
绑定到同一个公众号 是可以的哦
绑定至同一个公众号就可以了