function insertJS(src, callback){
var script = document.createElement("SCRIPT"), done = false;
script.type = "text/javascript";
script.src = src;
script.charset = "GB2312";
script.onload = script.onreadystatechange = function(){
if ( !done && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete") ) {
done = true;
callback();
}
};
document.getElementsByTagName("HEAD")[0].appendChild(script);
}
insertJS("1.js", function(){ test(); });