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!
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn