var flag = displayMessage(message);
if(flag=='true'){
SaveAndGo(paramId,uniqueControlId);
}
想在displayMessage()
函数调用完成后检查if条件,当前它检查if条件并行。我尝试了多种选择,但它对我不起作用。
答案 0 :(得分:0)
you could try to do something like this. based on your requirement you have to modify your code. look this :
var val = 10;
function displayMessage(callback){
alert("first function execute");
return callback();
}
var flag = 10;
displayMessage(function(){
if(flag == val){
alert("Now condition code execute");
}
})