使用web-view内嵌网页后,为什么无法从网页中返回小程序

发布于 8 年前作者 osun18518 次浏览最后编辑 8 年前来自 ask

<html>

<body >

<script type=“text/javascript” src=“https://res.wx.qq.com/open/js/jweixin-1.3.0.js”>script>

<script type=“text/javascript”>

    wx.miniProgram.navigateTo({url:‘/pages/index/faxian’});

</script>

</body>

</html>

各位大虾哪里不对么

2 回复
guiyinglai
guiyinglai1 楼6 年前

我尝试用buttn也不行

按钮也不行:

<!DOCTYPE html>

<html>

<body >

<button href=“javascript:void(0);” onclick=“aClick()”>测试</button>

<script type=“text/javascript” src=“https://res.wx.qq.com/open/js/jweixin-1.3.0.js”></script>

<script type=“text/javascript”>

    function aClick(){

        wx.miniProgram.navigateTo({url:‘pages/index/faxian’});

    }

</script>

</body>

</html>

chao09
chao092 楼6 年前

这个问题解决了吗