Summary of front-end development

Source: Internet
Author: User

1. the return value of the WebService method cannot be void.
When the returned value of the WebService method is void, FF and chrome will continue to wait and think that the request is not over, and everything in IE is normal.
2. When the input type = "button" or the button is used, clicking it triggers the form submit.
At that time, the problem of page refresh was found for a long time, and the final result was that the button automatically triggers the form submit, resulting in the refresh of the current page.
3. Set document. domain in JS only from second-level domain name to top-level domain name.
For example, if you access moozi.cnblogs.com, you can write document on this page. domain = 'cnblogs. com '; if you set the domain to cnblogs.com, you cannot use document. domain = 'moozi .cnblogs.com ';.
4. Use Dom fragments to create IFRAME. When cross-origin is used, you cannot use js to write the IFRAME domain.
For example, you can set the domain document. Domain = 'cnblogs. com' in the export ifrm = createelement ('iframe') example '.
5. When you modify the front domain, ckeditor is normal, and tinymce needs to reset the domain.
Ckeditor can automatically identify the current domain without errors. Tinymce must be set manually. At the same time, if you use ckfinder to upload a file and you need to modify its input code, otherwise there will be an error message indicating no permission due to different domains.
6. When tinymce is used, although your initialization code has only one sentence, it may appear as early as possible. The cause is unknown. This bug may occur if you are not sure.
7. When developing JS components, always pay attention to the reference of closures and this, which has suffered a lot of losses.
8. When converting a string to a jquery object, pay attention to the closed tag of the string HTML code.
For example, VAR html = '<span> test </span>' var jqel = $ (HTML); in this case, jqel will discard ''in HTML.
9. jquery1.2.6 and jquery1.3 differ in details.
Jquery1.2.6 fails to process hasclass ('. classname'), but jquery1.3 does not.
10. Use jquery's each as little as possible, and use JavaScript native code for high performance.

Summary of front-end development

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.