您现在的位置:首页 >> 前端 >> 内容

html网易前端面经实现方法

时间:2018/1/6 16:08:23 点击:

  核心提示:含泪再来一篇面经编写函数,实现:inject(node1, node2, top); //node1作为node2内部顶部子节点插入 inject(node1, node2, bottom); //n...

含泪再来一篇面经…

html网易前端面经实现方法

编写函数,实现:
inject(node1, node2, ‘top’); //node1作为node2内部顶部子节点插入 inject(node1, node2, ‘bottom’); //node1作为node2内部底部子节点插入 inject(node1, node2, ‘after’); //node1作为node2的下一个兄弟节点插入
function inject(node, target, direction){

}

已提供三个判断类型函数 isSimple、isArray、isPlainObject,编写函数实现深克隆。

function deepClone(obj){

 }

Tags:HT TM ML L网 
作者:网络 来源:Milk_o3o的博