//selector:可以为dom对象,也可以为dom对象的id值
//etype:监听的事件类型:up,down,left,right
//endFun:事件完毕后的回调方法
var zyEvent = function(selector,etype,endFun){
<script>
function log(s){
        document.getElementById("contid").innerHTML = s;
}

var eva = new zyEvent(document,'up',function(){log('向上滑动')});
var evb = new zyEvent(document,'down',function(){log('向下滑动')});
var evc = new zyEvent(document,'left',function(){log('向左滑动')});
var evd = new zyEvent(document,'right',function(){log('向右滑动')});

</script>

 

相关文章:

  • 2022-12-23
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-28
  • 2022-12-23
猜你喜欢
  • 2021-08-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-10
  • 2021-12-23
  • 2022-01-02
相关资源
相似解决方案