zoukankan      html  css  js  c++  java
  • ExtJS的MessageBox总结

    自己写了个ExtJS的MsgBox的小模版,以后遇到需要使用提示的地方就拿过来改改,免得每次都重新写。

     1       /**MsgBox start**/
     2           Ext.Msg.buttonText.yes = "是";
     3           Ext.Msg.buttonText.no = "否";
     4           Ext.Msg.buttonText.cancel = "退出";
     5           Ext.Msg.buttonText.ok = "确定";
     6          var errorTitle = "错误提示";
     7          var infoTitle = "信息提示";
     8          var questionTitle = "问确定提示";
     9          var warningTitle = "警告提示";
    10           Ext.Msg.show({
    11               title: errorTitle, //errorTitle infoTitle questionTitle warningTitle
    12               closable: false,
    13                300,
    14               icon: Ext.MessageBox.ERROR, // ERROR INFO QUESTION WARNING
    15               msg: "你确定要删除该用户吗?",
    16               buttons: Ext.Msg.YESNO, // CANCEL OK OKCANCEL YESNO YESNOCANCEL
    17               fn: function(btn) {
    18                   if(btn == "yes" || btn == "ok") {
    19                       alert(btn);
    20                   } else if(btn == "no" || btn == "cancel"){
    21                       alert(btn);
    22                   }
    23               }
    24           });
    25           /**MsgBox end**/

  • 相关阅读:
    c++类的知识点(1)
    并查集经典例题分析
    并查集
    bfs-迷宫
    出栈次序--数学归纳法--蓝桥
    九宫重排
    Tomcat详解
    寒假日记-第三天
    寒假日记-第二天(MySQL语句)
    Java学期总结
  • 原文地址:https://www.cnblogs.com/dreamroute/p/3613485.html
Copyright © 2011-2022 走看看