摘要: (function($){ $.extend($.expr[':'], { between:function(a,i,m) { var tmp=m[3].split(','); return tmp[0]-0<i&&... 阅读全文
posted @ 2015-11-09 23:29 simple_ac 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 来源:http://www.jb51.net/article/50230.htm类型用法jQuery wrapper$('input', $('form')).lengthDOM reference$('input', document.forms[0]).lengthdocument$('inpu... 阅读全文
posted @ 2015-10-16 21:58 simple_ac 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 加载js的时候,用到的是加载css的时候,用到的是一个用到的是src,另一个用到的是href,这两个有什么区别呢?href 表示超文本引用(hypertext reference),在 link和a 等元素上使用src 表示来源地址,在 img、script、iframe 等元素上src 的内容,是... 阅读全文
posted @ 2015-09-17 21:37 simple_ac 阅读(1524) 评论(0) 推荐(0) 编辑
摘要: http://vanseodesign.com/css/vertical-centering/ 阅读全文
posted @ 2015-08-26 19:58 simple_ac 阅读(86) 评论(0) 推荐(0) 编辑
摘要: location.href 引导当前页的转向 var win = window.open('OPK://Messages/?uid=0&target='+s_price);if(win == null){alert('新窗口看起来是被一个弹出窗口拦截程序所阻挡。 如果想打开新窗口,我们建议您将本站点... 阅读全文
posted @ 2015-08-10 20:12 simple_ac 阅读(86) 评论(0) 推荐(0) 编辑
摘要: http://www.alloyteam.com/2012/11/javascript-throttle/1. 必须用context传递this,否则setTimeout中this为window对象 function fn(){} var throttle=functio... 阅读全文
posted @ 2015-08-04 22:07 simple_ac 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 1.call要逐个传入参数2apply方法的必须 function curry(fn) { var args=Array.prototype.slice.call(arguments,1); return function() { ... 阅读全文
posted @ 2015-08-04 08:46 simple_ac 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 1 (function() 2 { 3 var i=0; 4 setInterval(function() 5 { 6 if(i<5) 7 { 8 console.log(i++); 9 }10 ... 阅读全文
posted @ 2015-07-31 18:21 simple_ac 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 1undefined>-1一个是数值先转化另一个为数,后台调用Number()方法Number(undefined);//NaN2任何数值和NaN比较,falsenull,undefinednull==undefined; //truenull!=undefined; //falsenull==0;... 阅读全文
posted @ 2015-07-31 16:46 simple_ac 阅读(132) 评论(0) 推荐(0) 编辑
摘要: frames["richedit"].document.designMode = "on";添加到window.onload事件,否则可能出问题 阅读全文
posted @ 2015-07-30 10:01 simple_ac 阅读(258) 评论(0) 推荐(0) 编辑