码迷,mamicode.com
首页 > Web开发 > 详细

extjs5备忘(2)

时间:2015-03-05 16:56:14      阅读:169      评论:0      收藏:0      [点我收藏+]

标签:extjs

<!DOCTYPE html>

<html>

   <head>

         <metahttp-equiv="Content-Type" content="text/html;charset=UTF-8">

        <title>Welcome to ExtJS!</title>

       <link rel="stylesheet"type="text/css"href="ext/build/packages/ext-theme-neptune/build/resources/ext-theme-neptune-all.css">

       <scripttype="text/javascript"src="ext/build/ext-all.js"></script>

       <scripttype="text/javascript"src="ext/trial/5.0.0/build/packages/ext-theme-neptune/build/ext-theme-neptune.js"></script>

 

        <script type="text/javascript" src="app.js"></script>

   </head>

   <body></body>

</html>

本博客所有内容是原创,如果转载请注明来源

http://blog.csdn.net/myhaspl/

技术分享

app.js

Ext.application({

   name   : ‘MyApp‘,

 

   launch : function() {

 

        Ext.widget({

            renderTo : Ext.getBody(),

            xtype    : ‘grid‘,

            title    : ‘学生‘,

            width    : 650,

            height   : 300,

            plugins  : ‘rowediting‘,

            store    : {

                fields : [ ‘name‘, ‘age‘,‘sex‘, ‘score‘ ],

                data   : [

                    [ ‘张三‘, 35, ‘男‘, 98.5 ],

                    [ ‘李四‘, 29, ‘女‘, 68.4 ]

                ]

            },

            columns: {

                defaults: {

                    editor : ‘numberfield‘,

                    width  : 120

                },

                items: [

                    { text: ‘名字‘,dataIndex: ‘name‘, flex: 1, editor: ‘textfield‘ },

                    { text: ‘年纪‘,dataIndex: ‘age‘ },

                    { text: ‘性别‘,dataIndex: ‘sex‘ , flex: 1, editor: ‘textfield‘ },

                    { text: ‘成绩‘,dataIndex: ‘score‘ }

                ]

            }

        })

   }

});

 


extjs5备忘(2)

标签:extjs

原文地址:http://blog.csdn.net/myhaspl/article/details/44084693

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!