i've tried several thing and can't get this to alert in order
any help appreciated , what would you recommend
function first(callback){
setTimeout("alert('alert first')", 900);
callback();
}
function second(callback){
setTimeout("alert('alert 2nd')", 100);
callback();
}
function thrid(callback){
setTimeout("alert('alert 3rd')", 100);
callback();
}
first(function() {
second(function() {
thrid(function() {
alert('all 3 functions alerted in order alert this last');
});
});
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…