随笔分类 -  JavaScript

摘要:原文链接:http://mp.weixin.qq.com/s?__biz=MjM5MzMyNzg0MA==&mid=2650402470&idx=1&sn=0ae1cc22f3f1851777c0bd6133be390c&scene=23&srcid=0802JTUsXlrunc5h67NBXut1 阅读全文
posted @ 2016-08-02 10:49 ICupid 阅读(424) 评论(0) 推荐(0)
摘要:原文地址:http://undefinedblog.com/debounce-and-throttle/ 二、什么是debounce 1. 定义 如果用手指一直按住一个弹簧,它将不会弹起直到你松手为止。 也就是说当调用动作n毫秒后,才会执行该动作,若在这n毫秒内又调用此动作则将重新计算执行时间。 三 阅读全文
posted @ 2016-06-12 17:01 ICupid 阅读(1011) 评论(0) 推荐(0)
摘要:(function ($, window) { //设置默认值并用逗号隔开 var defaults = { padding: 20, mouseOverColor: '#000000', mouseOutColor: '#ffffff' }; function PaddingList(ele, o 阅读全文
posted @ 2016-03-08 23:18 ICupid 阅读(317) 评论(0) 推荐(0)
摘要:原文地址:前端开发博客http://caibaojian.com/jquery-extend-and-jquery-fn-extend.htmljQuery为开发插件提拱了两个方法,分别是:jQuery.fn.extend();//$.fn.extend()jQuery.extend();//$.e... 阅读全文
posted @ 2015-11-19 17:39 ICupid 阅读(203) 评论(0) 推荐(0)
摘要:本文转自:http://www.ruanyifeng.com/blog/2011/08/a_detailed_explanation_of_jquery_deferred_object.html一、什么是deferred对象?开发网站的过程中,我们经常遇到某些耗时很长的javascript操作。其中... 阅读全文
posted @ 2015-11-09 12:26 ICupid 阅读(152) 评论(0) 推荐(0)
摘要:想让Bird继承Animal需要,把Animal的构造函数和原型的属性和方法,都传给Bird 阅读全文
posted @ 2015-09-18 16:44 ICupid 阅读(170) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2015-09-05 20:13 ICupid 阅读(557) 评论(0) 推荐(0)
摘要:function urlArgs() { var args = []; var query = location.search.substring(1); var paris = query.split("&"); for (var i = 0, len = paris.length; i... 阅读全文
posted @ 2015-09-04 22:39 ICupid 阅读(292) 评论(0) 推荐(0)
摘要:function on(node,type,funchandler) { node = typeof node == "string" ? document.getElementById(node) : node; if (!document.all) ... 阅读全文
posted @ 2015-08-30 22:37 ICupid 阅读(209) 评论(0) 推荐(0)
摘要:手机号: mobile: /^1[3578][0-9]{9}$/,验证码: code: /^\d{6}$/,邮箱: email: /^([-_A-Za-z0-9\.]+)@([_A-Za-z0-9]+\.)+[A-Za-z0-9]{2... 阅读全文
posted @ 2015-08-23 12:55 ICupid 阅读(194) 评论(0) 推荐(0)
摘要:nextSibling nextSibling nextSibling nextSibling nextSibling ... 阅读全文
posted @ 2015-08-03 15:05 ICupid 阅读(134) 评论(0) 推荐(0)
摘要:function next(ele) { if (typeof ele.nextElementSibling == 'object') { return ele.nextElementSibling; } ... 阅读全文
posted @ 2015-08-03 11:07 ICupid 阅读(1642) 评论(0) 推荐(0)
摘要:... 阅读全文
posted @ 2015-07-30 17:53 ICupid 阅读(187) 评论(0) 推荐(0)
摘要:... 阅读全文
posted @ 2015-07-30 10:18 ICupid 阅读(122) 评论(0) 推荐(0)
摘要:花了20大洋,买了一个视频,这是读书笔记 港媒称,日前,一则“女明星冷冻卵子”新闻让“冻卵子”进入了公众视野,不少超过平均育龄期的妇女纷纷向医院打听冷冻卵子的过程及相关费用和安全性。国家计生委相关负责人近日对媒体表示:冷冻卵子技术属于人类辅助生殖技术范畴... 阅读全文
posted @ 2015-07-29 18:20 ICupid 阅读(161) 评论(0) 推荐(0)
摘要:一、Arguments该对象代表正在执行的函数和调用他的函数的参数。[function.]arguments[n]参数function :选项。当前正在执行的 Function 对象的名字。n :选项。要传递给 Function 对象的从0开始的参数值索引。说明:Arguments是进行函数调用时,... 阅读全文
posted @ 2015-07-29 17:53 ICupid 阅读(1238) 评论(0) 推荐(0)
摘要:公司与企业可以从概念和形式上来区别 公司与企业可以从概念和形式上来区别 公司与企业可以从概念和形式上来区别 公司与企业可以从概念和形式上来区别 公司与企业可以从概念和形式上来区别 公... 阅读全文
posted @ 2015-07-29 16:24 ICupid 阅读(280) 评论(0) 推荐(0)
摘要://计算ele这个元素距离浏览最左和上边的偏移量 function offset(ele) { var l = ele.offsetLeft... 阅读全文
posted @ 2015-07-29 10:54 ICupid 阅读(248) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2015-07-27 23:20 ICupid 阅读(514) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2015-07-27 22:32 ICupid 阅读(3704) 评论(0) 推荐(0)