Video address: http://v.youku.com/v_show/id_XMTA4NzIxNTc2.html
2013-08-23 20:48:11
1. viewport
Ext. container. viewport represents the entire area of the browser window. When the document body is used as the rendering object, it automatically adjusts its size according to the size of the browser window. Only one viewport instance can appear on a page. In addition, it does not provide support for the scroll bar. If you need to use the scroll bar, you need to set it in its subpanel.
2013-08-23 23:48:17
2. // namespace
Ext. namespace ('ext. test ');
// Person class
Ext. Test. Person = function ()
{
};
// The static method of person can be called by using Ext. Test. Person. printt () on the page.
Ext. Test. Person. printt = function (){
VaR temp = new Ext. Test. Person ();
Alert (temp. Name );
};
// Ext. apply is the corresponding attribute that assigns the subsequent JSON object to person.
Ext. Apply (ext. Test. Person. prototype ,{
Name: "XX ",
Printt: function () {// This method must be instantiated before it can be called: New Ext. Test. Person (). printt ();
Alert (this. Name );
}
});
Ext. Test. Person. Prototype in is written as Ext. Test. Person. propertype
Oh, it's been a night!
3. class inheritance
2013-08-24 00:09:24
First, you must define a class (namespace + class name). Assume that it is another one under Ext. Test.
Person1
Ext. Test. person1
= Function (){
};
Next, use Ext. Extend (ext. Test. person1, ext. Test. Person, {name: "FF"}); Make person1 inherit the person and assign a new value to the name,
Call New
Ext. Test. person1 (). printt ();
4. namespace alias
2013-08-24 00:33:14
After you declare Ext. namespace ('ext. test ');
Replace the namespace with an alias:
Dc = ext. Test; // note that no quotation marks exist.
Rules
Uppercase and lowercase letters
Category name rules: all uppercase
For example, PS = Dc. person; or PS = ext. Test. person;
This must be written under the person defined, otherwise it will not work, that is, there are classes and aliases first.
5. renderto
: Ext. getbody (); 10:57:04
Eg:
VaR but = new Ext. Button ({
Name: "test ",
Renderto
: Ext. getbody ()
});
Is to create a button named test and place the generated but object to ()
In the body of the obtained document, because it is not an HTML element obtained through new Ext. Button, it must be converted to an HTML Element Through renderto.
Listeners