📜  使用 jQuery $.getScript() 包含多个 js 文件 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:26.144000             🧑  作者: Mango

代码示例1
$.when(
    $.getScript( "/mypath/myscript1.js" ),
    $.getScript( "/mypath/myscript2.js" ),
    $.getScript( "/mypath/myscript3.js" ),
    $.Deferred(function( deferred ){
        $( deferred.resolve );
    })
).done(function(){
    
    //place your code here, the scripts are all loaded
    
});