Pinned Repositories
-
<head> <meta charset="UTF-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"> <title>滑动事件Demo</title> </head> <body> <article>上下左右滑动</article> </body> <style> *{ margin: 0; padding: 0; } article{ background-color: #000000; width: 100%; height: 100px; text-align: center; line-height: 100px; color: #FFFFFF; } </style> <script> (function() { var touch = {}; function direction(startX, changeX, startY, changeY) { return Math.abs(startX - changeX) >= Math.abs(startY - changeY) ? (startX - changeX > 0 ? 'Left' : 'Right') : (startY - changeY > 0 ? 'Up' : 'Down') } document.getElementsByTagName('body')[0].addEventListener('touchstart', function(e) { touch.startY = e.targetTouches[0].pageY; touch.startX = e.targetTouches[0].pageX; //console.log("点击时的X坐标" + nStartX + "和Y坐标" + nStartY); }); document.getElementsByTagName('body')[0].addEventListener('touchmove', function(e) { touch.whenChangY = e.changedTouches[0].pageY; touch.whenChangX = e.changedTouches[0].pageX; //console.log("滑动时的X坐标" + nWhenChangX + "和Y坐标" + nWhenChangY); }) document.getElementsByTagName('body')[0].addEventListener('touchend', function(e) { touch.changY = e.changedTouches[0].pageY; touch.changX = e.changedTouches[0].pageX; //console.log("滑动后的X坐标" + nChangX + "和Y坐标" + nChangY); var swDirection = direction(touch.startX, touch.changX, touch.startY, touch.changY); console.log(swDirection); }) })() </script>
-1
git
-compatible
a-new-day
CV
:see_no_evil:《切图仔面试宝典》
express-ejs-mongoose-nodejs
express-ejs-mongoose-nodejs-repository-archive-master.zip
github-emoji
:dog:基于Vue编写的Github表情包大全 Writing based on Vue for github emoji
https-gitee.com-ontw-express-ejs-mongoose-nodejs-repository-archive-master.zip
mongoose
Daisyxi's Repositories
Daisyxi/CV
:see_no_evil:《切图仔面试宝典》
Daisyxi/-
<head> <meta charset="UTF-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"> <title>滑动事件Demo</title> </head> <body> <article>上下左右滑动</article> </body> <style> *{ margin: 0; padding: 0; } article{ background-color: #000000; width: 100%; height: 100px; text-align: center; line-height: 100px; color: #FFFFFF; } </style> <script> (function() { var touch = {}; function direction(startX, changeX, startY, changeY) { return Math.abs(startX - changeX) >= Math.abs(startY - changeY) ? (startX - changeX > 0 ? 'Left' : 'Right') : (startY - changeY > 0 ? 'Up' : 'Down') } document.getElementsByTagName('body')[0].addEventListener('touchstart', function(e) { touch.startY = e.targetTouches[0].pageY; touch.startX = e.targetTouches[0].pageX; //console.log("点击时的X坐标" + nStartX + "和Y坐标" + nStartY); }); document.getElementsByTagName('body')[0].addEventListener('touchmove', function(e) { touch.whenChangY = e.changedTouches[0].pageY; touch.whenChangX = e.changedTouches[0].pageX; //console.log("滑动时的X坐标" + nWhenChangX + "和Y坐标" + nWhenChangY); }) document.getElementsByTagName('body')[0].addEventListener('touchend', function(e) { touch.changY = e.changedTouches[0].pageY; touch.changX = e.changedTouches[0].pageX; //console.log("滑动后的X坐标" + nChangX + "和Y坐标" + nChangY); var swDirection = direction(touch.startX, touch.changX, touch.startY, touch.changY); console.log(swDirection); }) })() </script>
Daisyxi/-1
git
Daisyxi/-compatible
Daisyxi/a-new-day
Daisyxi/express-ejs-mongoose-nodejs
Daisyxi/express-ejs-mongoose-nodejs-repository-archive-master.zip
Daisyxi/github-emoji
:dog:基于Vue编写的Github表情包大全 Writing based on Vue for github emoji
Daisyxi/https-gitee.com-ontw-express-ejs-mongoose-nodejs-repository-archive-master.zip
Daisyxi/mongoose
Daisyxi/new-repository
Daisyxi/public
Daisyxi/staticky
a better and simple static file server
Daisyxi/yueyintai
vue模拟的悦音台
Daisyxi/yueyintai-
vue模拟的悦音台