admin管理员组文章数量:1345518
话不多说,直接上代码
/*核心css*/
.wxtip{background: rgba(0,0,0,0.8); text-align: center; position: fixed; left:0; top: 0; width: 100%; height: 100%; z-index: 998; display: none;}
.wxtip-icon{width: 52px; height: 67px; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAABDCAYAAADTXyaSAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABGFJREFUeNrcmmdoFEEUxyd69kSIgomxoUbsUSPWIGrUiJEQRRFBI9jFIDZsEcsH4wchoKKoEQ1YQYxixYIV/WCJiiKKCnbFErHGWC7xP+R/cC53l9292UtmH/yyl53Zvf3v23nvzexFlZeXCxdYS/AKlNVwgZhJ4IgUI/+J0txD9UAxtzXd4KG9FCOtnfyjs6BpYLTf/0k6C2oDthv2ddZZ0NEA+zrqKmiDzxsGS9Ixyg0Hp4K0eUGCTh7qYhDzw9Auw3YXXQTJi80Eu0E2SAbRIBUU/DeO5COnATVALcO+BaAxP2eAMnBZFw/JsuaPYV9/0I+fj4Hu4ILKoBAFWoEPAZ5vJ8bTM/Dd2KDCQ0vBeiDvzHHQFYwClymyJ2iqWFAemB+oIRxBMlMPBi/BO+7LArfAE5BPQdtAmmJBM8CWgC02BmgsiAZbwVAT/ZuAuqAQbFEQIM6BxcHaPTbC5xWQA2aZPOY9twfATxALSvnZjsnHuyRoq43wmQaahnGH74Fsm8fmgdRQfayMoYXgNDgD3oYRCeeBQpvH1/IVoSo81BxMUJQoc0GBhf4eMAvEVdbXrIf6gHTOEFXY4yBTgGD2F4wHAyrtafIOjQKnOIZUlTO9wGgT/WLACFDbzHmrcvqwi3d+SiX92oOzLEg/VjpITQraxPnG3AiLjgcNGfq/+paqQpnZMXQI7FN8sXKV5i5oHaLPElYEn82IseKhZvziKwoFNWawuRAgycoE3oMJuJSllCkz6yFZo21U7KFPHEONguSrwxT2xMpJzXrI4xc+VVlDemcZk7XPhvBGP+BU5JcTggSnBrfBCocDQSEfwYl2DrZSnMpEeEPxJG0zGMfpRxZnnRPMBoBw50P5XJhYrUjQI1bg8qbW41iKZxD4bfekVqcPHYgKa08PzaZXUpSsA9isFFaBRD4mdu06aAIG8iadViHIY/O4h0x2vcFYRiqvhfUAefG5TK7PiRoLs8BMB9dY3u/m+lgDbn3rZW1BCihi2x5wFaxzYg0v3FWfk8z2f5kz3nG9bK3fpFC+w3nDKuMPw3EqU4Byc6La9r1Rk7mkNiNpqV+7DACdwHInBHkcOKd/XRYo/HoZnh2xSC8FrwEvwFS3CErkcrFj5omQkJnMNeOd/qJIeEhOAeoTx81pD61kJTAkUs+0U4IWgQacchRFcpB6FJ9rv6h4Sy1DdwK4GemlpHAExTCnDOJiRiZnl/W5SlQlZqdSqMML38FqWZb/I0XF+yKvqGKzI+ggeM3lpThwSVQjsyJoK6fgT+mJaiXEyhjqwW0Jp+DnRTU2Mx6Sq6ay0xihgYXy0DCKmF4dBrsKQTIsy7dlxUIjC1bLnQBfWLYINwi6A74JDc34yGVwEtZNaGpGD91lQenRVZD/hc8RFb/JyREam7+Hngq9f/b8X2KdLCp+1JCvuyCfR2TiTBYuMOmhtti2ABfdIEh6qC/YKVxi0kMxFPbFLR66r2OJE0qQXGp66BZB/wQYADkBmnEvOp6EAAAAAElFTkSuQmCC) no-repeat; display: block; position: absolute; right: 30px; top: 20px;}
.wxtip-txt{padding-top: 107px; color: #fff; font-size: 16px; line-height: 1.5;}
网页中增加以下代码:
<div class="wxtip" id="JweixinTip" >
<span class="wxtip-icon"></span>
<p class="wxtip-txt">点击右上角<br>选择在浏览器中打开</p>
</div>
js触发:
$("#JweixinTip").show(); 或者:document.getElementById("JweixinTip").style.display="block";
说明下处理过程:
css部分为样式控制 涉及到的图片已经base64编码,直接引入样式即可
html代码可以直接用
js diam可以放入 页面中的点击事件,或者是load事件中
之所以要用这个是因为以下原因:
1: 微信屏蔽了apk下载操作
2: 部分网站涉及到支付问题,比如没有开通微信支付,此时,在微信中打开页面,一般情况下,是不能使用支付宝等其他支付的
版权声明:本文标题:微信提示打开浏览器js代码 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/biancheng/1743812941a2543404.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论