标签:div switch 鼠标 bsp fun 兼容 nta eve 2.0
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; } } }
标签:div switch 鼠标 bsp fun 兼容 nta eve 2.0
原文地址:https://www.cnblogs.com/jokes/p/9689828.html