最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

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

业界 admin 4浏览 0评论

给予点击事件,然后调用以下方法即可(我这用的是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

给予点击事件,然后调用以下方法即可(我这用的是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

发布评论

评论列表 (0)

  1. 暂无评论