ExtJS起步,绝对的入门。
1、下载ExtJS库(文件为ext-4.0.1-gpl.zip),解压到C:/ext-4.0.1,这个文件夹就是根目录了。
2、在C:/ext-4.0.1下面建立自己的工作目录,也就是文件夹。假设为xhp524,目录就是C:/ext-4.0.1/xhp524。
3、写html文件。新建html文件,命名为xhp.html,并修改代码,如下:
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>My first ExtJS App</title>
- <!-- Include Ext and app-specific scripts: -->
- <mce:script type="text/javascript" src="../adapter/ext/ext-base.js" mce_src="adapter/ext/ext-base.js"></mce:script>
- <mce:script type="text/javascript" src="../ext-all-debug.js" mce_src="ext-all-debug.js"></mce:script>
- <mce:script type="text/javascript" src="xhp.js" mce_src="xhp.js"></mce:script>
- <!-- Include Ext stylesheets here: -->
- <link rel="stylesheet" type="text/css" href="../resources/css/ext-all.css" mce_href="resources/css/ext-all.css">
- <link rel="stylesheet" type="text/css" href="xhp.css" mce_href="xhp.css">
- </head>
- <body>
- 啦啦啦~
- </body>
- </html>
三行javascript,两个link,意思就是得要连接他们。最好都有
4、写javascript文件。新建javascript文件,命名为xhp.js,并修改代码,如下:
- // JavaScript Document
- Ext.onReady(function()
- {
- alert("消息ExtJS闪亮登场!");
- }
- );
5、运行xhp.html文件,就是第一个ExtJS程序啦。
重复3和4就可以得到很多很多的啦~~~
原文首次发表时间:2011-05-24 17:25
1万+




被折叠的 条评论
为什么被折叠?



