3
我想调用另一个JavaScript文件中的函数。
function foo(){
//before $.getScript
$.getScript('otherScript.js', function() {
otherFoo();
});
//after $.getScript
}
但是这会在调用otherFoo()函数之前执行otherScript.js的整个$(document).ready()部分。我怎样才能防止$(document).ready()被调用,并只调用otherFoo()函数?
我不认为你可以。 – putvande