Project Background:. Net 3.5 + MySQL + jquery + WebService
I have been working on this project in my company for more than six months. To sum up some questions, I hope more friends in the garden can share some tips.
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> & nbsp; 'var jqel = $ (HTML); in this case, jqel sets' & nbsp; 'discard.
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.
Http://www.cnblogs.com/moozi/archive/2010/03/03/1677843.html