中大阿里巴巴校招笔试个人分享

ps.看着一堆师兄、大三的还有研究生的、突然觉得自己好年轻。

 

 上次web群里一直在讨论网申投简历实习,不小心顺手也投了一篇、简历都没提交,就留了联系方式而已...大二的人怎么去实习...纯属玩玩而已.....可能中大报名的人都能去。 

 

 直接讲题了、不讲故事了。

 

总共六道题、题目可能记不清了,记不清的就讲大意吧

1、这题就是让你根据一个表格、他把写出来涉及到了,table  tbody thead/th   rowspan  colspan那些  我蛋疼的加了一个tfoot..其实是有的、不知道有没有用错 

 但是要注意一点的就是,有一列用了rowspan的话 下面的tr中要少一个td...

 

2、这题的考点就是css代码的简化

  

 2 
 3 /*原题题意大概如此...考点都在这了、重复的我就删掉了*/
 4 
 5 div.container {
 6      width: 500px;
 7      background-image: url(/img/sprite.png);
 8      background-repeat: no-repeat;
 9      background-position: 4px 10px;  /*数字记不清了*/
10  }
11  
12  div.container #news-list, div.container #news-list li {
13      background-image: url(/img/sprite.png);
14      background-repeat: no-repeat;
15      background-position: 4px 10px;  /*数字记不清了*/
16  }
17  
18  a {
19      font-size: 14px;
20      color: #00000000;
21      line-height: 150%;
22      font-weight: bold;
23 }
24 

 

这个大概就这样做吧、 

  

 2 div.container {
 3      width: 500px;
 4      background: url(/img/sprite.png) no-repeat 4px 10px;
 5  }
 6  
 7 #news-list, #news-list li {
 8      background: url(/img/sprite.png) no-repeat 4px 10px;
 9  }
10  
11  a {
12      font: bold 14px/150%; color: #000000
13 }
14 

 

 

3.这题有两个小题、给你一个登录框的图片 (a) 符合web语义的html代码  (b) 用css实现图片效果(form的边框是圆角加透明)

 这边应该是仅支持现代浏览器、border-radius.我透明用的是border:thick solid rgba(0,0,0,0.5)  。语义化id设得人一眼看出那个id是干嘛的就好

那个x按钮图片要右float...细节蛮多的、目测很悬 。

 

4、这题让你找出页面中 class 为test的节点

 

我写了三种(这数字太虚幻了、其实就一种)

  1、jquery 中的$(".test")

  2、仅支持部分浏览器的 getElementsByClassName的DOM操作

  3、这个可以叫做无环数的深搜么?贴代码先...可惜我最后忘记写调用的、然后DOM中压根没有hasChildNodes()这方法、把那个判断去掉应该就对了吧?...提交交卷的坏处 0 0

   

var myNode = [],
    body = document.body;   /*忘记写了- -调用,给跪了,就只写了一个函数*/

function getNode(a) {
   //if (a.hasChildNodes()){
       var child = a.childNodes,
           len = child.length;

       for (var i = 0; i < len; i++){
           getNode(child[i]);
       }
  // } else {
       if (a.className == "test"){
          myNode.push(a);
       }
   //}
}

getNode(body);

 

5、这一题就是给你一个有重复数的数组、然后让写一个函数 返回值为去掉重复数字后的数组、这个用一个hash-table就可以了

  

 2 var arr = [1, 2, 2, 3, 4, 5, 6, 6];
 3 
 4 function getArray(a) {
 5     var hash = {},
 6         len = a.length,
 7         result = [];
 8     
 9     for (var i = 0; i < len; i++){
10         if (!hash[a[i]]){
11             hash[a[i]] = true;
12             result.push(a[i]);
13         } 
14     }
15     return result;
16 }
17 
18 getArray(arr); // 输出[1, 2, 3, 4, 5, 6]
19 

 

6、聊一聊你对前端工程师的看法...这个看你多能吹水了...前端不仅仅是前端...

 

 

噗...全部就是这些、感觉蛮好玩的、原来中大写前端的还有美女师姐~~坐在我后面的后面的后面的后面...哈哈、这次笔试纯属体验生活、蛮好玩的感觉、那个监考官一定是东北妹子、这么霸气的~祝大家好运 @会长 @范师兄 @其它师兄师姐

 

 

posted on 2013-05-05 15:29  李珠刚  阅读(2819)  评论(18编辑  收藏  举报

导航