$.messager.alert title, msg, icon, fn Show an alert window. Parameters:
title: The title text to be showed on header panel.
msg: The message text to be showed.
icon: The icon image to be showed. Available value are: error,question,info,warning.
fn: The callback function triggered when window closed.
Code example:
$.messager.alert('My Title','Here is a info message!','info');
This messenger alert "fn" works as expected if I click "OK", but if I click on the "X" in the top right corner it doesn't call the "fn" (e.g., cancel and ok may be different functions).
A true alert, whether you click on "ok" or "x" should call the function, IMO. If not, I need an ability to remove the "X" from the top right corner, or define the same fn as "fn2" or something.