$.messager.confirm('Confirm', 'Are you sure to exit this system?', function(r){ if (r){ // exit action; }});