1、考查函数表达式知识
var h = function a(){ return 23; } console.log(typeof a()) // 报错 2、封装函数insertAfter( );功能类似insertBefore( ) Element.prototype.insertAfter = function(targetNode, afterNode){ var beforeNode = afterNode.nextElementSibling; if(beforeNode == null){ this.appendChild( targetNode ) }else{ this.insertBefor( targetNode, beforeNode) } }js面试题
2024-03-26 22:38:58