1. 程式人生 > >js隱藏微信功能按鈕方法

js隱藏微信功能按鈕方法

<script>
function onBridgeReady(){
 WeixinJSBridge.call('hideOptionMenu');
}


if (typeof WeixinJSBridge == "undefined"){
    if( document.addEventListener ){
        document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
    }else if (document.attachEvent){
        document.attachEvent('WeixinJSBridgeReady', onBridgeReady); 
        document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
    }
}else{
    onBridgeReady();
}
 </script>