笔试面试总结
2016-02-16 21:20
399 查看
1、Array API :join,pop,push,shift(从头删除),unshift(从头插入),sort,reserve(反转),slice(返回一段),splice(删除一段)
2、string API: charAt,contact,indexOf(查询字符串),lastIndexOf,match(返回匹配串),replace,slice(返回一段),split,substr
3、原生 元素(Element)节点 API:DOM节点分为 文档节点、元素节点、属性节点、文本节点、注释节点
元素节点集合对象 NodeList 是一个类数组对象其中 list.item(0)相当于 list[0]
属性:
属性:attributes,className,id,style,title
内容:childNodes,firstChild,lastChild,innerHTML,textContent
周边:previousSibling,nextSibling,parentNode
方法:
增:appendChild,cloneNode,insertBefore(新子节点,位置子节点),(createElement在document节点才有)
删:removeChild
查:getElementsByTagName,hasChildNodes(getElementsByName和getElementById在document节点才有)
改:replaceChild
属性:getAttribute(返回指定属性的值),getAttribute(返回属性节点对象),hasAttribute(存在指定属性),hasAttribute(存在属性),
removeAttribute,removeAttributeNode,setAttribute,setAttributeNode,(createAttribute在document节点才有)
4、js面向对象:
function MyClass(){
var private = 0; //私有成员
}
MyClass.prototype.public = 0; //公开成员
5、常考算法:
(1)、字符串判重,用JS对象自带的map功能
2、string API: charAt,contact,indexOf(查询字符串),lastIndexOf,match(返回匹配串),replace,slice(返回一段),split,substr
3、原生 元素(Element)节点 API:DOM节点分为 文档节点、元素节点、属性节点、文本节点、注释节点
元素节点集合对象 NodeList 是一个类数组对象其中 list.item(0)相当于 list[0]
属性:
属性:attributes,className,id,style,title
内容:childNodes,firstChild,lastChild,innerHTML,textContent
周边:previousSibling,nextSibling,parentNode
方法:
增:appendChild,cloneNode,insertBefore(新子节点,位置子节点),(createElement在document节点才有)
删:removeChild
查:getElementsByTagName,hasChildNodes(getElementsByName和getElementById在document节点才有)
改:replaceChild
属性:getAttribute(返回指定属性的值),getAttribute(返回属性节点对象),hasAttribute(存在指定属性),hasAttribute(存在属性),
removeAttribute,removeAttributeNode,setAttribute,setAttributeNode,(createAttribute在document节点才有)
4、js面向对象:
function MyClass(){
var private = 0; //私有成员
}
MyClass.prototype.public = 0; //公开成员
5、常考算法:
(1)、字符串判重,用JS对象自带的map功能
相关文章推荐
- 面试问题01
- BAT及各大互联网公司2014前端笔试面试题:HTML/CSS篇
- 成为优秀程序员的10条黄金法则
- 小小程序员的新年愿望
- 和程序猿们聊了聊AV女优,发现自己的尺度还是小了
- iOS面试题
- IT企业面试题(java描述)-字符串包含(1)
- 据说年薪30万的Android程序员必须知道的帖子
- 收录一些常用的面试题目
- cyc 的面试宝典之(面试1(java se 基础篇))
- 不少程序员都会碰到的三个面试题
- 如何利用Google成为一个更好的程序员
- 码农十年连载一
- 百度员工离职总结:资质平庸的人该怎么办?震惊了无数人!
- Java系统程序员修炼之道
- 程序员的恶性循环
- 一个菜鸟程序员的游戏开发心得
- 50道线程面试题
- 如何利用Google成为一个更好的程序员
- Android 面试题学习