日期:2014-05-16  浏览次数:20448 次

ExtJs4提示框按钮文本修改无效果,求帮助!!!
 
代码如下:
<script type="text/javascript">
        Ext.onReady(function () {
            Ext.MessageBox.msgButtons[0].setText('按钮一');
            Ext.MessageBox.msgButtons[1].setText('按钮二');
            Ext.MessageBox.msgButtons[2].setText('按钮三');
            Ext.MessageBox.msgButtons[3].setText('按钮四');

            Ext.MessageBox.show({
                title:'提示',
                msg: '自定义文字',
                modal:true,
                buttons:Ext.Msg.YESNOCANCEL
            });
        });
    </script>
------解决方案--------------------
Ext.window.MessageBox.buttonText={ok:'确定',yes:'是',no:'否',cancel:'取消'};

“确定”替换成“按钮1”
“是”替换成“按钮2”
类推...
即可实现你要的效果