摘要:
这篇将分析下jQuery.each及this.each方法。看看他们如何与jQuery.extend一起扩展jQuery库。部分源码如下?12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455jQuery.fn = jQuery.prototype = {...// Execute a callback for every element in the matched set.// (You can seed the arguments with 阅读全文
摘要:
在研究某个框架源码的时候,看到的。查了下资料,1.两个部分,一个是String.slice()slice( ) returns a string containing a slice, or substring, of string. It does not modify string。slice()返回一个子片段,对原先的string没有影响,还可以用负数当参数。Example://fromjavascript-thedefinitiveGuide5thEditionvars="abcdefg";s.slice(0,4)//Returns"abcd"s 阅读全文