舉個例子:require([‘a(chǎn)’,'b',"c"], function (a, b,c) {a.func();b.func();c.func();})在這個例子中,a, b,c三個模塊之間是同步加載的,而每一模塊加載完就執(zhí)行與模塊相關的回調(diào)函數(shù),a模塊加載完就執(zhí)行a.func()回調(diào)函數(shù),b模塊加載完就執(zhí)行b.func()回調(diào)函數(shù),c模塊加載完就執(zhí)行c.func()回調(diào)函數(shù)
- 1 回答
- 0 關注
- 623 瀏覽