您的位置:首页 > Web前端 > JavaScript

extjs5.0入门教程

2014-08-04 16:41 393 查看
下载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函数
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  extjs