Ext. Core. element is the basis for operations on all components and controls. It is the packaging of a DOM object. It is added with Dom operations and processed according to different browsers. All instances of this class show us the visual effect of continuing Ext. FX. anim Through Dom. This type of event is not an underlying event of Ext, but an encapsulated browser event. You can also access more underlying browser events through Ext. eventobject. browserevent. You can use the ID or DOM node to obtain the Ext. Core. Element Object, for example, ext. Get (element ID or DOM element node ).
Element control and usage example:
Ext. onready (function () {var e1 = ext. get ("the-ID"); var appende1 = ext. get ("the-ID-APPEND"); function fn1 () {Ext. MSG. alert ('hprompt ', "you pressed Ctrl + C on the element whose ID is 'the-id'");} e1.addcls ("special-CSS "); appende1.addcls ('special-CSS '); appende1.setwidth (240); appende1.setwidth (240, true); e1.focus (); e1.addclsonfocus ("Focus-CSS "); e1.addclsonover ("Mouseover-CSS"); e1.addclsonclick ("Click-CSS"); e1.setwidth (240); e1.setwidth (240, true); e1.addkeymap ({key: "C ", CTRL: True, FN: fn1, scope: E1}); e1.addkeylistener ({key: 'G', CTRL: true}, fn1, E1) ;}); function callappend () {Ext. MSG. alert ('hprompt ', ext. get ("the-ID-APPEND"), getcomputedwidth (); Ext. get ("the-ID "). appendto (ext. get ("the-ID-APPEND "));}