alert( String title, String msg, [Function fn], [Object scope] ) :
title:標題
msg:顯示內容
fn:回調函數
scope:作用域
<script type="text/javascript">
Ext.onReady( function(){
Ext.MessageBox.alert('Alert','彈出窗口Alert',function(){alert('abc')});
}
);
</script>
二、對話框(Ext.MessageBox.confirm 或 Ext.Msg.confirm)
confirm( String title, String msg, [Function fn], [Object scope] )
title:標題
msg:顯示內容
fn:回調函數
<script type="text/javascript">
Ext.onReady( function(){
Ext.MessageBox.confirm( "請確認", "是否要刪除指定內容", function(button,text){
alert(button);
} );
}
);
</script>
三、對話框(Ext.MessageBox.prompt 或 Ext.Msg.prompt )
prompt( String title, String msg, [Function fn], [Object scope] )
title:標題
msg:顯示內容
fn:回調函數
<script type="text/javascript">
Ext.onReady( function(){
Ext.MessageBox.prompt( "輸入提示框", "請輸入您的年齡", function(button,text){
alert(button);
alert(text);
} );
}
);
</script>
四、對話框(Ext.MessageBox.show 或 Ext.MsgBox.show)
Ext.onReady( function(){
Ext.MessageBox.show( {
title:"保存數據",
msg:"你已經作了一些數據修改,是否要保存當前內容的修改?",
buttons:Ext.Msg.YESNOCANCEL,
fn:save,
icon:Ext.MessageBox.QUESTION});
}
);