上一页 1 ··· 4 5 6 7 8 9 下一页
摘要: 1 阅读全文
posted @ 2017-07-24 13:57 Esther_Cheung 阅读(111) 评论(0) 推荐(0) 编辑
摘要: var arr= [1,4,12,343,45,232,11,34,5]; var quicksort = function (ray){if(ray.length<=1){return ray};var mid = Math.floor(ray.length/2);//取中位数,如果是小数就取更小 阅读全文
posted @ 2017-07-10 10:26 Esther_Cheung 阅读(109) 评论(0) 推荐(0) 编辑
摘要: analysis: 创建一个函数。该函数接受2个argument ,然后把他们设置成参数格式。创建一个对象,用object.create 输入null然后把函数硬绑定到该对象。用apply 并输入一些arguments ,由此形成对象内部的参数。bind分次传入不同的argument.(柯里化(Cu 阅读全文
posted @ 2017-06-16 11:20 Esther_Cheung 阅读(941) 评论(0) 推荐(0) 编辑
摘要: var byName = {};ancestry.forEach(function(person) { byName[person.name] = person;}); function reduceAncestors(person, f, defaultValue) { function valu 阅读全文
posted @ 2017-05-26 11:29 Esther_Cheung 阅读(168) 评论(0) 推荐(0) 编辑
摘要: function filter(array,test){ var neway=[] for (var i=0;i<array.length;i++){if(test(array[i]))neway.push(array[i]);} return neway;} function isTrue(per 阅读全文
posted @ 2017-05-19 11:49 Esther_Cheung 阅读(151) 评论(0) 推荐(0) 编辑
摘要: $('#zhetenga').click(function(){ //this是被点击的#zhetenga var that = this; $('.zhetenga').each(function(){ //this是.zhetenga循环中当前的对象 //that仍然是刚才被点击的#zheten 阅读全文
posted @ 2017-05-03 15:31 Esther_Cheung 阅读(143) 评论(0) 推荐(0) 编辑
摘要: .list1 li {list-style-type:none;}.list1 li + li a {border-top:1px solid #f00;} /*选择除了第一个元素之外的元素,在li 后面的li*/.list1 a {display:block; padding:3px 10px;} 阅读全文
posted @ 2017-05-02 09:50 Esther_Cheung 阅读(229) 评论(0) 推荐(0) 编辑
摘要: test 阅读全文
posted @ 2017-05-02 09:44 Esther_Cheung 阅读(102) 评论(0) 推荐(0) 编辑
摘要: CSS中,background-color属性在 image属性的下层。 background-image:url(images/150.png);如果叠加显示,CSS 规则中先列出的图片在上层 background-repeat:no-repeat; | repeat-x; | repeat-y; 阅读全文
posted @ 2017-04-27 13:54 Esther_Cheung 阅读(5567) 评论(0) 推荐(0) 编辑
摘要: border之外是margin, border之内是padding ,padding之内是width & height. margin 垂直外边距叠加,水平外边距不叠加。(上右下左,如圆形钟表,从半夜0点开始) width,默认值 auto,会让元素的宽度与其父元素同宽 . float:left o 阅读全文
posted @ 2017-04-27 08:56 Esther_Cheung 阅读(215) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 下一页