var body = document.getElementById("swiper-container");
body.addEventListener('touchmove',function(event){
setTimeout(function(){
$("#bg_footer").show();
},100)
},false);
body.addEventListener('touchend',function(event){
setTimeout(function(){
$("#bg_footer").hide();
},100)
},false);移动端的获取焦点和失去焦点事件
最新推荐文章于 2026-05-25 14:52:00 发布
本文介绍了一种使用JavaScript监听触摸事件来控制页面底部组件显示与隐藏的方法。通过为页面元素添加touchmove和touchend事件监听器,并利用setTimeout实现延迟显示或隐藏效果。

2万+

被折叠的 条评论
为什么被折叠?



