普通浏览器实现点击打开微信app

给予点击事件,然后调用以下方法即可(我这用的是jq的点击): $(function() {Cz.Alert().success({text: 请返回公众号查看充值结果});$(".ale

给予点击事件,然后调用以下方法即可(我这用的是jq的点击):

$(function() {
		Cz.Alert().success({text: '请返回公众号查看充值结果'});
		$(".alert-btn-cancel").click(function() {
                openwx();
                
		})
})
 function openwx(){

             locatUrl = "weixin://";

             if(/ipad|iphone|mac/i.test(navigator.userAgent)) {

                var ifr =document.createElement("iframe");

                ifr.src = locatUrl;

                ifr.style.display = "none";

                document.body.appendChild(ifr);

             }else{

                window.location.href = locatUrl;
             }

        }

  

转载于:https://wwwblogs/Yirson/p/10286313.html

发布者:admin,转转请注明出处:http://www.yc00.com/web/1741134874a4312805.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信