Ext and js details used in the project, extjs details

Source: Internet
Author: User

Ext and js details used in the project, extjs details

1. no replaceAll method is available in js, but replace (regex, "") can be used. The first parameter is a regular expression, and the second parameter is string, eg: str. replace (/\ r \ n/g, "*") means to replace all carriage returns.

2. Press enter in textarea to automatically fill \ r \ n, which can be obtained by js, but no \ r \ n is obtained by the server.

3. how to obtain DOM elements using EXT. getDom (), pay attention to Ext. get (), Ext. getDom (), Ext. getCmp (), Ext. difference in getBody.

4. Implement ctrl enter submission:

Event: function ctlSubmit (event) {if (event. ctrlKey & event. keyCode = 13) {form. submit ()} textare: <textarea name = "co" cols = "50" rows = "10" onKeyDown = "ctlSubmit (event);">

5. Differences between renderTo and contentEl:

RenderTo generally refers to rendering the Panel to a certain place. When I use contentEl, I render a custom label (such as div) to this Panel.
6. Highlight the page, change textarea to panel, and dynamically modify the html attributes of the panel:

Ext. getCmp ("panelId"). body. update ("html code ")




How can I add extjs to a java web project? I use the Apache server eclipse tool.

Copy the ext-base.js, ext-all.js, ext-all.css, and the resource Directory to the project, and then introduce the above files in the page to use extjs, note that the ext-base.js must be before the introduction of the ext-all.js, the relevant files can be searched in the extjs Development Kit

Ext js 40 files to be added to the project


-This debugging and formatted js can be used during debug development.
-Dev is similar to-debug. It is also used for development with more annotations.
Bootstrap. js, in the page can only reference this js, this js will judge whether the current address is localhost, if it is localhost load-dev js if it is a domain name load ext-all.js



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.