クリックしてブラウザを開き、一般的なマイクロチャネルアプリを実現します



Click Open Browser Achieve Common Micro Channel App



クリックイベントを与えると、次のメソッドを呼び出すことができます(私はjqクリックを使用します):

$(function() { . Cz.Alert () success ({text: 'return to public view recharge result number'}) $('.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 } }