extjs5.0入门教程

来源:互联网 发布:tomcat怎么绑定域名 编辑:程序博客网 时间:2024/05/22 06:29

下载ext-5.0.0.736.zip,解压,

在项目WebRoot目录下加入ext-5.0.0.736\ext-5.0.0.736\build\ext-all.js

ext-5.0.0.736\build\packages\ext-theme-neptune\build\resources\ext-theme-neptune-all.css

ext-5.0.0.736\build\packages\ext-theme-neptune-touch\build\resources\images 整个文件拷贝到ext-theme-neptune.js文件同一目录下.

第一个程序示例

<!DOCTYPE html>

<html>

 <head>

   <title>test.html</title>

   

   <meta http-equiv="keywords"content="keyword1,keyword2,keyword3">

   <meta http-equiv="description" content="this is mypage">

   <meta http-equiv="content-type" content="text/html;charset=UTF-8">

   

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

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

    <scripttype="text/javascript" src="test.js"></script>

  

 </head>

 <body>

 </body>

</html>

test.js的内容

Ext.onReady(testWindow);

function testWindow() {

 

    Ext.create('Ext.window.Window',{

                         title : 'Hello',

                         height : 200,

                         width : 400,

                         html : "Hellow word!"

                  }).show();

};

程序运行结果如下图


Ext.onReady(testWindow);表示文档加载完成后执行testWindow函数


0 0