- 博客(3)
- 收藏
- 关注
原创 图片跟鼠标动
var eva = { getE: function (e) { return e || window.event; }, //可视区 getClientX: function (e) { return this.getE(e).clientX; }, ...
2018-07-30 16:02:04 123
转载 阻止事件行为
▶ 阻止事件冒泡(兼容IE与FF): //如果提供了对象则是非IE浏览器 if (e && e.stopPropagation) { //因此支持W3C的stopPropagation()方法 e.stopPropagation(); }else { window.event.canceBubble = ...
2018-07-30 09:33:41 136
原创 禁止拖拽时选中文本的方法
▶ JS方法:// firefox下禁止元素被选取的变通办法 element.onmousedown = new Function("return false"); element.onmouseup = new Function("return true"); //IE下var clearSelect = 'getSelection' in ...
2018-07-30 09:30:49 3003
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人