摘要: 1.sort() arr.sort([function]) 对数组元素排序。在原数组上排序,并返回这个数组。 (1)若没有function,按ascii字母顺序排序 (2)若有function,该函数比较两个值,返回一个说明这两个值相对顺序的数字。 a.若function(a,b)小于0,a排在b前 阅读全文
posted @ 2016-06-30 16:40 springmin 阅读(546) 评论(0) 推荐(0) 编辑
摘要: 1.bind() $(selector).bind(event,[data],function) bind方法给每个$(selector)元素都注册一个事件处理函数,不支持未来增加的元素。上面两段代码等价的。 2.live() $(selector).live(event,[data],functi 阅读全文
posted @ 2016-06-30 10:44 springmin 阅读(136) 评论(0) 推荐(0) 编辑