标签:fun function pac type city als osi UNC fse
微信分享
<!-- 微信分享开始 --> <div id="zs"> <img src="../images/live/wxShare.png" alt=""> </div> <div id="heibg"></div> <style> #zs { width: 100%; left: 0px; top: 0px; height: 100%; text-align: center; position: fixed; z-index: 99991; display: none; } #zs img { width: 100%; } #heibg { position: fixed; width: 100%; height: 100%; left: 0px; top: 0px; background: #000; opacity: 0.9; filter: alpha(opacity=90); z-index: 99990; display: none; } </style> <script type="text/javascript"> $(".wxShare").on(‘click‘, function () { if (isWeiXin()) { $("#zs,#heibg").show(); } else { layer.msg("请在微信中打开本页面分享到朋友圈", { icon: 0, offset: ‘50%‘, shift: 6 }); } }); function isWeiXin() { var ua = window.navigator.userAgent.toLowerCase(); if (ua.match(/MicroMessenger/i) == ‘micromessenger‘) { return true; } else { return false; } }; $(function () { $("#zs,#heibg").on("click", function () { $("#zs,#heibg").hide(); }) }) </script> <!-- 微信分享结束-->
图片
标签:fun function pac type city als osi UNC fse
原文地址:https://www.cnblogs.com/kikyoqiang/p/12555423.html