Ext JS Learning Eighth Day Ext Basic Understanding Ext.js and Ext-more.js

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.