ExtJS learning ---------- Ext. DomHelper class learning (instance), extjs instance

Source: Internet
Author: User

ExtJS learning ---------- Ext. DomHelper class learning (instance), extjs instance

Specific instance (the instance result is in the Program)

Ext. onReady (function () {// preparations Ext. create ('ext. panel. panel ', {title: 'domhelper-element generator use', width: '000000', height: 90%, renderTo: Ext. getBody (), html: '<div id = d1> I am d1 </div>'}); // DomHelper // 1: createHtml or markup method // configuration item description: the name of the four // tag elements // children/cn indicates the child element // cls indicates the style // html: Text Content // var html = Ext. domHelper. createHtml ({// tag: 'ol ', // cn: [// {tag: 'lil', html: 'item1'}, // {tag: 'lil', html: 'item2'} //] //}); // lele.info (html );/ /Print the result to the console // return result: You can view the console. The html value is: <ol> <li> item1 </li> <li> item2 </li> </ol> // you can set various attributes in the tag, the results generate the traditional HTML // var html = Ext. domHelper. createHtml ({// tag: 'div ', // children: [// {tag: 'A', html: 'bjsxt website', href: 'www .bjsxt.cn '}, // {tag: 'input', value: 'click', type: 'button '} //] //}); // lele.info (html); // 2: createDom method (this method is used to generate native dom nodes, which is not recommended) // var dom = Ext. domHelper. createDom ({// tag: 'div ', // html: 'My div '//});// Lele.info (dom); // alert (dom. nodeName); // 3: append method // Ext. domHelper. append ('d1 ', {// tag: 'ul', // cn: [{tag: 'lil', html: '20140901'}, {tag: 'lil', html: '000000'}] //}); // Ext. domHelper. append ('d1 ',' <span> I am a span </span> '); // 4: insertHtml method // This method is used to operate native node // parameter description: String where, HTMLElement/TextNode el, String html // Ext. domHelper. insertHtml ('beforebegin', Ext. getDom ('d1 '),' 



Learn EXTJS

Haha, the landlord is the same as I did when I first learned ExtJS. It is indeed a little difficult to learn at the beginning. But that was the idea you had before you knew enough about the power of EXTJS.
"But most of the element la s on the EXTJS page are implemented by JS .. if you disable JS. so there is nothing like a page... this is one of the reasons why I have never learned EXTJS ,"
I don't quite support this sentence. I would like to ask which websites do not use JS or static pages?
Summary:
1. a good learning environment (I learned from myself when I was in the company, because the company needs to use this technology, so it puts pressure on me)
2. A good API (the English version is recommended, because you have to understand English for the latest IT technology)
3. Network Environment)
4. Have the habit of reading the source code (there are various code writing methods in the source code, and how to reuse components, etc ..)

Extjs learning problems, really depressed recently want to learn extjs, download the ext-230 on the official website, always don't do well

First, the problem may be that the order of the ext package is wrong. We recommend that you write the package order according to the api documentation ,,,
I don't know much about others. I am also a beginner. If you are interested, you can communicate with me. In fact, for beginners, just look at the api and examples. ext4.0 charges fees, so if you don't need it very much, don't use 4.0 or less ,,

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.