This query returns an array with multiple elements, and selects all span labels for the entire document
Ext.query ("span");
This query returns an array of elements because the ID of Foo is queried.
Ext.query ("span", "foo");
This query returns an array containing an element of Foo!
Ext.query ("#foo");
Ext.query (". Foo");
This returns an array that contains all the elements of the document.
Ext.query ("*");
This returns an array of elements that contain the P tag's div tag
Ext.query ("div p");
Ext.get Selector
Ext.onready (function(){ varel = Ext.get ("The-id");El.addclass ("Special-css");//to add a style sheet to an elementEl.focus ();//move focus to El elementEl.addclassonfocus ("Focus-css");//Add and remove CSS classes for Get and lose focusEl.addclassonover ("Mouseover-css");//adding and removing CSS classes for mouse move-out eventsEl.addclassonclick ("Click-css");//Add and remove CSS classes for click eventsEl.setwidth (280);//set the width of the element to 100-phaseEl.setwidth (280,true);//set the width of the element to 100 with animation effectEl.addkeymap ({key: "C", Ctrl:true, Fn:fn1,scope:el});//bind El Elements call the FN function when the keyboard presses the CTRL + C keyEl.addkeylistener ({key: "G", Ctrl:true},fn1,el);//The same function as the above addkeymap, except that the parameters are passed differently.
Ext.select Selector
var el = Ext.select (["Div1"],true); El.on ("click",function tes () { Ext.Msg.alert ("hint", "you clicked on the node with ID ' div1 ');});
EXT.GETCMP Selector (return Ext component Component Object)
// get the component with Id ' Panel1 ' var comp = ext.getcmp (' Panel1 '); Ext.Msg.alert (' hint ', "get the ID of ' panel1 ' of the component type is" +comp.getxtype ());
Ext.getdom selector (returns an HTML node element. Available)
var comp = ext.getdom (' Panel1 '); Ext.Msg.alert (' hint ', ' ID of Dom obtained by Ext.getdom: ' +comp.id+ ' <br> get the panel's DOM by another way its ID: "+panel.el.dom.id");
ExtJS Study Notes (i)