Extjs Panel

刚学习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>

 

你可能感兴趣的:(ExtJs)