Very useful Ext. Core. Element

Source: Internet
Author: User

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 "));}

 

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.