html页面右侧滚动,HTML5页面点击和左右滑动页面滚动
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
HTML5測試$(function() {
var startX, startY, endX, endY;
var showADID = 1;
document.getElementById("divADBox").addEventListener("touchstart", touchStart, false);
document.getElementById("divADBox").addEventListener("touchmove", touchMove, false);
document.getElementById("divADBox").addEventListener("touchend", touchEnd, false);
function touchStart(event) {
var touch = event.touches[0];
startY = touch.pageY;
startX = touch.pageX;
}
function touchMove(event) {
var touch = event.touches[0];
endX = touch.pageX;
}
function touchEnd(event) {
$("#img0" + showADID).hide();
showADID++;
if (showADID > 4) {
showADID = 1;
}
$("#img0" + showADID).show();
$("#spText").html("X軸移動大小:" + (startX - endX));
}
})
標簽:
isp
版權申明:本站文章部分自網(wǎng)絡,如有侵權,請聯(lián)系:west999com@outlook.com
特別注意:本站所有轉載文章言論不代表本站觀點!
本站所提供的圖片等素材,版權歸原作者所有,如需使用,請與原作者聯(lián)系。
與50位技術專家面對面20年技術見證,附贈技術全景圖總結
以上是生活随笔為你收集整理的html页面右侧滚动,HTML5页面点击和左右滑动页面滚动的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: android 多点触控缩放,Andro
- 下一篇: 前端为什么有的接口明明是成功回调却执行了