extjs4.0教程一


1.學習extjs4.0的條件
    HTML-->了解
    CSS-->了解
    JS-->熟練
    JS的OOP-->熟練
    AJAX-->熟練
    JSP/PHP/ASP-->熟悉其中之一

2.extjs4.0的學習方法
    書籍: www.uspcat.com推薦的書籍
    網絡: 官方網站,文檔API,開源的論壇
    勤奮: 多思考,多實踐,多練習,多總結
    總結: 猜一猜,查一查,試一試

3.extjs4.0下載,目錄介紹,開發環境搭建,開發工具安裝配置
    http://www.sencha.com/
    spket1.6.18下載和安裝
4.extjs4.0需要引入的js和css文件

<link rel="stylesheet" type="text/css" href="extjs4/resources/css/ext-all.css" />
<script type="text/javascript" src="extjs4/bootstrap.js"></script>
<script type="text/javascript" src="extjs4/locale/ext-lang-zh_CN.js"></script>

5.HELLO程序

Ext.onReady(function(){
Ext.MessageBox.alert("hello word","hello extjs4.0");
});

5.真正學習extjs之前先看看如何開展javascript的Object對象,對extjs的理解很有幫助

Ext.onReady(function(){
var myArray = [1,2,3,-3,-4,0,-5,9];
/**
//靜態方法every()
Ext.Array.every(myArray,function(itme){
if(itme>=0){
alert(itme);
return true;
}else{
alert(itme+"false");
return false;
}
},this);
*/

/**
//filter()數組過濾
var newArray = Ext.Array.filter(myArray,function(item){
if(item>0){
return true;
}else{
return false;
}
});
alert(newArray.toSource());
*/
var Person = {name:'yfc',age:26};
//alert(Person['name']);
//extjs4.0提供getKey的函數
//alert(Ext.Object.getKey(Person,'yfc'));
Object.prototype.getValue = function(key,defValue){
if(this[key]){
return this[key];
}else{
return defValue;
}
}
alert(Person.getValue("email","pcat@126.com"));
});





免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM