For the mobile html page,
wrote a function.
function showAlert(msg,fn){
showDialog("alert", msg,"warm reminder",260);
if(isNull(fn) == false){
$( "#SD_confirm").unbind("click");
$("#SD_confirm").bind("click",fn);
}
}
function exist( ){
alert("aaa");
}
fn is a function, when calling it I wrote
showAlert(json.msg,exist());
As a result, when I reached this line of code, before I reached the showDialog method, I went to exist and aaa popped up. What happened? I later found out that I had written it wrong.
should be written as
showAlert(json.msg,exist);
In this way, the dialog prompt will pop up first, and then click OK to pop up aaa.
Damn it. It turns out that there was a mistake in the brackets. Sigh!