This article to record the study notes;
• Know Ext.js and ext-more.js first of all, we need to know the role of these 2 JS files, these two files contain some basic definitions of EXT, basic properties and methods, we want to focus on learning and drill down into the underlying code for research. • If shown: API location, Ext.js method: –ext.apply&ext.applyif–ext.extend–typeof–isempty, Isiterable, Isfunction, isArray...– Iterate the following from pest look at these methods is the actual use of methods, please look at the Chestnut code Bar!
Ext.onready (function () { //----------------------------------------------------------------------------------------------------------- ----------- //ext.js File //ext.apply & Ext.applyif //let's start with the creation of two objects Src and config varsrc = {name: ' Z3 ', Age: ' 18 '};//Source Object varConfig = {name: ' L4 ', Sex: ' Male '};//Configuration Objects //ext.apply is the extension of the property or method for an object.Ext.apply (src, config);//The result is name: ' L4 ', Age: ' + ', Sex: ' Man '; we saw Z3 was L4 to cover off, interested in children's shoes can read the source //Let's take a look at the Applyif method. //If a property exists for the current object, I do not copy it if it does not existExt.applyif (src, config);//The result is name: ' Z3 ', Age: ' + ', sex: ' Male ' //----------------------------------------------------------------------------------------------------------- ----------- //Ext.extend about extend in front of you . //----------------------------------------------------------------------------------------------------------- ----------- //ext.typeof and native JavaScript typeOf varstr = ' abc '; varnum = 123; Ext.typeof (str); //result is a stringExt.typeof (num);//The result is number //----------------------------------------------------------------------------------------------------------- ------------------ //IsEmpty, Isiterable, Isfunction, IsArray ... Here, give me a chestnut. //Check out the API yourself here. vararr =NewArray (1, 2, 3); Alert (Ext.isarray (arr)); //result is true //----------------------------------------------------------------------------------------------------------- --------------- //iterate traversing an arrayExt.iterate (arr,function(item) {alert (item);// the }); //----------------------------------------------------------------------------------------------------------- --------- //Ext.override CoverageExt.define (' User ', {say:function() {alert (' Say ... '); } }); varuser = Ext.create (' user '); Ext.override (user,{say:function() {alert (' I was covered after the Say method. '); } }); User.say ();});
Come here today, go on tomorrow, make a little progress every day.
To recommend an article network www.fishcmonkey.com, learning to improve the literary accomplishment;
Ext JS Learning Eighth Day Ext Basic Understanding Ext.js and Ext-more.js