Messager 消息框
用 $.messager.defaults 重寫了 defaults。
依賴
- window
- linkbutton
- progressbar
用法
1. $.messager.alert('Warning','The warning message');
2. $.messager.confirm('Confirm','Are you sure you want to delete record?',function(r){
3. if (r){
4. alert('ok');
5. }
6. });
特性
名稱 |
類型 |
說明 |
默認值 |
ok |
string |
確定按鈕的文字。 |
Ok |
cancel |
string |
取消按鈕的文字。 |
Cancel |
方法
名稱 |
參數 |
說明 |
$.messager.show |
options |
在屏幕的右下角顯示一個消息窗口,options 是一個配置對象: |
$.messager.alert |
title, msg, icon, fn |
顯示一個提示窗口。參數: |
$.messager.confirm |
title, msg, fn |
顯示一個帶“確定”和“取消”按鈕的確認消息。參數: |
$.messager.prompt |
title, msg, fn |
顯示一個帶確定和取消按鈕的消息窗口,提示用戶輸入一些文字。參數: |
$.messager.progress |
options or method |
顯示一個進度的消息窗口。 代碼示例 顯示進度消息窗口: $.messager.progress(); 現在關閉消息窗口: $.messager.progress('close'); |