下面四个p
在chrome浏览器中可以正常拖拽
在IE浏览器拖拽时后面三个p会跳到第一个p的位置,鼠标不能按在p上拖动
在firefox上拖动不了
如何解决???
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
IE下,event对象有srcElement属性,但是没有target属性;
Firefox下,event对象有target属性,但是没有srcElement属性;
所以要考虑兼容:e=e.srcElement || e.target
然后判断e.nodeName等不等于SELECT
预览
htmlcssdrag 拖拽函数封装调用