出来ますか?これを行う方法?ボタンをクリックすると、 が呼び出されますfunction1。条件が真 ( i==1) の場合、一時停止し、が完全に実行function1された後にのみ次のコードが実行されます。function2例:
function1(i){
//some code here
if(i == 1){
function2(i); // call function2 and waits the return to continue
}
//the following code
}
function2(i){
//do something here and returns
}