jquery,等待完成
如何仅在第一个函数将在中完成时运行第二个函数jquery,等待完成,jquery,Jquery,如何仅在第一个函数将在中完成时运行第二个函数 $(document).ready(function() { $("#first").load("first.php?id="+ Math.random()); $("#second").load("second.php?id="+ Math.random()); }); load()附带一个回调参数: $(document).ready(function() { $("#first").load("first.php?id="+ Math.
$(document).ready(function() {
$("#first").load("first.php?id="+ Math.random());
$("#second").load("second.php?id="+ Math.random());
});
load()
附带一个回调参数:
$(document).ready(function() {
$("#first").load("first.php?id="+ Math.random(), {}, function() {
$("#second").load("second.php?id="+ Math.random());
});
});
{}
用于将空对象传递给数据
参数