When close the message window, the 'onClose' event fires. If you click the 'Ok Cancel' buttons, the callback function 'fn' will be called. If you press ESC key, only the 'onClose' event fires.
$.messager.confirm({
title:'Title',
msg:'message.',
closable:false,
onClose:function(){
console.log('onClose')
},
fn:function(r){
console.log(r)
}
})