微信 常用事件整理

2021-08-11 03:53:04 字數 1335 閱讀 5592

1、隱藏網頁底部導航欄

weixinjsbridge.call('hide*******');
2、禁止使用者分享

weixinjsbridge.invoke('disabledshare',{},function

(e))

3、禁用長按選中文字-css

* 

//手機瀏覽器中:

*

$(『body』).on(『touchmove』, function

(event)

);or

document.addeventlistener('touchmove', function

(e), false);

這樣會把頁面原生的scroll效果也一同去掉了,下面的**可以完美解決這個問題:

//給需要下拉的box新增乙個class="scroll"

var overscroll = function

(el) else

if(currentscroll === totalscroll)

});el.addeventlistener('touchmove', function

(evt) );

}overscroll(document.queryselector('.scroll'));

document.body.addeventlistener('touchmove', function

(evt)

});

5、網頁集左右滑動檢視

class="infopics">

class="picimg"

ng-repeat="picture in info.infocontent.pitctures">

ng-src="}"

ng-click="previewpics(picture.imgpath)">

div>

div>

//js部分:

var pictures = ;

angular.foreach(pitctures,function

(k,i));

$scope.previewpics = function

(currenturl));

} else );}}

JS ONCLICK常用事件

1.開啟 name button1 2.另存為 name button2 3.屬性 name button3 4.列印 name button 5.頁面設定 name button4 6.重新整理 name refresh 7.匯入收藏夾 name button5 8.匯出收藏夾 name butt...

JavaScript 常用事件

狀態 事件 說明 滑鼠 鍵盤事件 onclick 滑鼠單擊時觸發此事件 ondblclick 滑鼠雙擊時觸發此事件 onmousedown 按下滑鼠時觸發此事件 onmouseup 滑鼠按下後鬆開滑鼠時觸發此事件 onmouseover 當滑鼠移動到某物件範圍的上方時觸發此事件 onmousemov...

JS ONCLICK常用事件

1.開啟 name button1 2.另存為 name button2 3.屬性 name button3 4.列印 name button 5.頁面設定 name button4 6.重新整理 name refresh 7.匯入收藏夾 name button5 8.9.加入收藏夾 name bu...