Pre-development preparation
After downloading and extracting the ExtJS package, you can get the file folder structure:
In the actual development process does not need all the files and folders, the required include such as the following folder can be:
If you are using Eclipse for development, simply copy the above files to the Webroot folder or its subfolders.
Start
- New firstextjs.html
- Before using ExtJS, it is necessary to introduce the corresponding style and JS file on the page, and the minimum collection is usually the following: Ext-all.js,adapter/ext/ext-base.js,locale/ext-lang-zh_ Cn.js and the entire Resources folder.
Ext-all.js,adapter/ext/ext-base.js includes all the functions of ext, all JS scripts are here.
Locale/ext-lang-zh_cn.js is a Chinese translator.
The resources folder is a CSS style sheet and a picture.
- note the order in which JS files are imported
- Writing HTML
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd" >
- Finally effect
At this point, the first ExtJS program is done. The process must be careful and careful, do not appear low-level errors. I was in the introduction of JS files when the path is wrong, the majority of Days O (︶^︶) O. Just not clear why the final display effect is still so ugly. 囧
Changes:
Previously, there was no import of images under the resources folder, causing problems with the display. New Folder structure:
After importing images again, it will display normally:
Second, the first ExtJS program: Helloextjs