刚学习Extjs

Extjs Panel

@{  
    Layout = "~/_SiteLayout.cshtml";
    Page.Title = "欢迎访问我的网站!";
}
@{
    string strmessage = "Extjs 是个很不错的东东哦";
}
<script type="text/javascript">
    Ext.onReady(function () {
        var p = new Ext.Panel({
            id: "panel1",
            title: "biaoqi",
            renderTo: Ext.getBody(),
            width: 300,
            height: 200,
            frame: true, //设置背景
            closable: false,  /*关闭按钮*/
            tbar: [{ text: "工具栏1" }, {
                text: "工具栏2", handler: function () {//事件
                    Ext.MessageBox.alert("系统提示", "你点击了 工具2");
                }
            }],
            html: "@strmessage",//内容
            buttons: [{ text: "取消" }, {
                text: "确认", handler: function () {
                    Ext.MessageBox.alert("系统提示", "你点击了确认按钮!");
                }
            }]
            , tools: [{ id: "Save" }, { id: "help" }],//菜单
            buttonAlign: "center"//Button的布局形式
        });
    });
</script>

 

相关文章:

  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-28
猜你喜欢
  • 2021-09-01
  • 2021-09-22
  • 2021-10-11
  • 2022-12-23
  • 2022-12-23
  • 2021-08-06
相关资源
相似解决方案