$.getScript("my_lovely_script.js", function(){
alert("Script loaded and executed.");
// Use anything defined in the loaded script...
});
不使用jQuery的方法请参考:http://stackoverflow.com/questions/950087/include-a-javascript-file-in-another-javascript-file
$.getScript("my_lovely_script.js", function(){
alert("Script loaded and executed.");
// Use anything defined in the loaded script...
});
不使用jQuery的方法请参考:http://stackoverflow.com/questions/950087/include-a-javascript-file-in-another-javascript-file
评论