getButton: function(event){//鼠标按钮兼容 if (document.implementation.hasFeature(‘MouseEvents‘,‘2.0‘))//标准下 { return event.button; }else { switch (event.button)//非标准下 { case 0: case 1: case 3: case 5: case 7: return 0; case 2: case 6: return 2; case 4: return 1; } } }
原文地址:https://www.cnblogs.com/jokes/p/9689828.html
时间: 2024-10-18 13:02:29