NHN CHINA 公司笔试题
1.在这写代码
Var array1 = [10,20];
Var array2 = [8,5];
Var result = array1.add(array2);
Alert(result);
输出结果 18,25
2.解析 dom tree
<html>
<body>
<input type=”text” name=”username” value=”请填写姓名”>
</body>
</html>
3.要求按按钮后 my word 向下移 10px
Function fun(){
//在这填写代码
}
<style>
#name{
Color:red,
Height:100px,
Weight:110px
Left:50px;
Top:50px;
}
</style>
<div id=”name”>
My word
</div>
<input type=”button” onclick=”fun()”>
4.给出一段代码去替代 addEventListener 和 attachEvent
Function myAttachEvent(o,evt,fun){};
-----------Alert(o.Xclient+o.Yclient);
myAttachEvent(document,’click’,onClick);
5.用 js 写段代码,当按按钮后自动在 div 层中添加组建
<javascript>
//在这填写代码
- 1
- 2
- 3
前往页