<p>
<ul>
<li><a href="http://www.baidu.com"></a></li>
<li><a href="http://www.baidu.com"></a></li>
</ul>
</p>
在做移动轮播切换的时候,在ul取消浏览器默认事件(e.preventDefault()), a href的url也不能跳转,有什么办法可以解决吗?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
如果是ul设置e.preventDefault() 应该会跳转吧
在touchend里面判断,如果不用处理touchmove里面的逻辑的话,再发送一个CustomEvent去触发那个click事件。
请自行搜索creatEvent,dispatchEvent这两个js函数
为了回避一些了的touch事件的问题,我用了tap事件