kingge08 发表于 2013-1-29 09:29:34

改变提示框按钮默认的文字

<script type="text/javascript">Ext.onReady(function(){/*方法一:如果在配置对象中提供的信息不全就会出现按钮上没有文字的现象即:buttonText定义的属性个数必须和buttons个数一致。*///必须放在创建提示框之前Ext.MessageBox.buttonText = {yes: '是',no: '否',cancel: '取消'};Ext.MessageBox.show({title: '提示',msg: '改变按钮的文字',modal: true,buttons: Ext.Msg.YESNOCANCEL,fn:function(id){alert(id);}})/*方法二:*/Ext.MessageBox.buttonText.yes = '是';Ext.MessageBox.buttonText.no = '否';Ext.MessageBox.show({title: '提示',msg: '自定义按钮文字',modal:true,buttons: Ext.Msg.YESNOCANCEL});});</script>
页: [1]
查看完整版本: 改变提示框按钮默认的文字