JS
EeeEui
github: https://github.com/EeeEui
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
禁止拖拽时选中文本的方法
▶ JS方法:if (typeof(element.onselectstart) != "undefined") { // IE下禁止元素被选取 element.onselectstart = new Function("return false"); } else { // firefox下禁止元素被选取的变通办法原创 2016-06-22 22:40:44 · 4581 阅读 · 0 评论 -
阻止事件行为
▶ 阻止事件冒泡(兼容IE与FF):function stopBubble(e) { //如果提供了对象则是非IE浏览器 if (e && e.stopPropagation) { //因此支持W3C的stopPropagation()方法 e.stopPropagation(); }else { window.event.ca原创 2016-06-11 13:13:53 · 401 阅读 · 0 评论 -
jQuery开发插件模板
使用jQuery开发一个小插件的模板写法: HTML代码:<span id="test">test</span>JS代码:<script type="text/javascript"> !function ($) { "use strict"; var Plugins =function(element,option){ this.$element =原创 2017-04-05 14:48:11 · 542 阅读 · 0 评论
分享