Ext Js【Hello World】 ——4.1 beta 1
准备:vs+ExtJs4.1Beta1
ExtJS 4.1 xiazai_ https://yunpan.cn/cqv6bdBwtRjAj (提取码:2733)
- 引用,cs文件,js主入口,zh—cn提示文件(初步认为)
-
一般onReady都是给一个ExtJS Application的入口...就相当于C或Java的main函数.一般要求把创建ExtJs的组件放在onReady的方法里.如:
Ext.onReady(function(){
var view = new Ext.Viewport(.....);
})
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title></title> <link href="ext-4.1.0-beta-1/resources/css/ext-all.css" rel="stylesheet" /> <script src="ext-4.1.0-beta-1/ext-all.js"></script> <script src="ext-4.1.0-beta-1/locale/ext-lang-zh_CN.js"></script> </head> <body> <script type="text/javascript"> Ext.onReady(function () { if (Ext.BLANK_IMAGE_URL.substr(0,4)!="data") { Ext.BLANK_IMAGE_URL = "./images/s.gif"; } Ext.create('Ext.Viewport', { // new Ext.Viewport({ layout: 'fit', items: [{ xtype: "panel", title: "欢迎", html:"<h1 style='text-align:center;font-size:60px;font-weight:bold;'>Hello World</h1>", }], }); }); </script> </body> </html>