function loadJs(path,callback){
var header=document.getElementsByTagName("head")[0];
var script=document.createElement('script');
script.setAttribute('src',path);
header.appendChild(script);
//对于浏览器的判断是ie还是其他
if(!"\v"==="v"){
script.onload=function(){
console.log("非ie");
callback();
}
}else{
script.onreadystatechange=function(){
if(script.readystate=="loaded" ||script.readState=='complate'){
console.log("ie");
callback();
}
}
}
}
注: 在IE中不支持onreadystatechange、只支持onload