前端技术-2016年阿里前端开发工程师笔试题

1、下面哪个不属于W3C标准盒模型?
a.内容
b.边框
c.内边距
d.轮廓
 
2、下列事件哪个不属于鼠标触发的事件?
a.click
b.contextmenu
c.mouseout
d.keydown
 
3、一个实现搜索结果的页面,如果你想实现高亮搜索关键词,应该使用下面哪个tag?
a.<strong>
b.<mark>
c.<em>
d.<highlight>
 
4、浏览器在一次HTTP请求中,需要传输一个4097字节的文本数据至服务器,可以采用哪些方式?
a.存入indexdDB
b.存入COOKIE
c.放在URL参数
d.写入Session
e.使用post
f.放在Local Storage
 
5、下面哪个不是CSS中表示尺寸的单位?
a.px、%
b.em、rem
c.mm、ck
d.pt、pc
 
6、请在____处填写答案,从而达到题目的要求
var arr = [1, 2, 3, 4, 5];
var result = arr.sort(_______________________________).join("+");
console.log(result);

7、把一个字面量对象,变成某个类的实例

function Type() {}
var a = {};
______________ 
// a instanceof Type === true

8、补充下面的函数,判断p为Array

function isArray(p){
  return Object.prototype._____.apply(p)==='_____';  

}

9、请写一个表格以及对应的CSS,使表格奇数行为白色背景,偶数行为灰色背景,鼠标移上去时为黄色背景。 

10、实现一个程序,输入为一段英文文本,示例如下:

Alibaba Group Holding Limited is a Chinese e-commerce company that provides consumer-to-consumer, business-to-consumer and business-to-business sales services via web portals. It also provides electronic payment services, a shopping search engine and data-centric cloud computing services. The group began in 1999 when Jack Ma founded the website Alibaba.com, a business-to-business portal to connect Chinese manufacturers with overseas buyers. In 2012, two of Alibaba’s portals handled 1.1 trillion yuan ($170 billion) in sales.

统计这段文本中单词的出现频率、分布区间,要求如下:
1. 仅统计英文单词,1999 $170 1.1 标点符号之类的不算做单词
2. 区间分 4个:少(出现1-5次)、 中(出现6-10次)、高(出现 11-20),极高(出现 >20 次) ,给出每个区间单词数目在总单词数中的百分比
3. 返回如下的 JSON 对象:

{
  'occurrence': [/** 数据元素的第一个元素为单词,第二个位出现次数**/
  ['alibaba', 10]
  ['consumer', 10]
  ['business', 8]
],
'distribution': {
  'high': '30%',
  'low': '20%',
  'medium': '40%',
  'veryHeigh': '10%',
}
}
原文地址:https://www.cnblogs.com/sdgf/p/4740698.html