The differences between eval and window. eval can be understood by friends who learn js.
Are there any differences between them?In the development process, it seems that few people add an extra window. For example, the callback function parses
In many cases, we do not fill in all the information in one step, and then submit it. The step-by-step filling form is as follows:
Step 1 fill in the basic information,
Step 2 fill in the Education Information
Verification is required for each
Sort out some JavaScript IE and Firefox compatibility solutions, and have better ways to communicate with each other
1. document. form. item Problems(1) existing problems:
Many statements such as document. formName. item ("itemName") exist in the
The acquisition of event objects is very simple. A long time ago, we knew that the event object in IE is a global object (window. event) exists. In Firefox, it is passed in as the first parameter of the handle (handler. So a line of code can be done.
First of all, I would like to thank EtherDream for his different points of view. In the article "batch operation style with cssText attributes", I made further tests due to his questioning attitude.
The Code is as follows:
It turns out that
Most javascript operations require obtaining an element on the page, referencing it as an object in the current script, and then performing operations or obtaining the node tree. The W3C standard recommended syntax is to get an element in the DOM
In the previous article "mouse event latency switching plug-in", I have already written several simple extension examples. Today I suddenly think that the animate method of jQuery's Custom Animation can use delay for example:
The Code is as
In the past, the shortest IE determination was developed by virtue of the feature that IE does not support vertical tabs. Code:
Var ie =! + "\ V1 ";
Only 7 bytes! See this article, "32 bytes, ehr... 9, ehr... 7 !!! To know if your browser is IE,
UglifyJS is a tool for compressing and beautifying javascript. In its documentation, I see several methods for optimizing if statements. Although I haven't used it for some trial tests, I can see from here that it has done some beautification work
IE is not as stupid as we think. It knows that the total number of cycles is still 10 million. Therefore, we need to separate these one hundred cycles. Although Javascript is single-threaded, you can use setTimeout or setInterval to simulate
Because javascript cannot obtain the imgfile header data, it must wait until it is loaded to obtain the actual size. Therefore, the lightbox effect is used to display the image in the center, as a result, the speed experience is much worse than that
For details about how to use getJSON in asp.net in Jquery, refer. Preparations
· Customer class
The Code is as follows:
Public class Customer{Public int Unid {get; set ;}Public string CustomerName {get; set ;}Public string Memo {get; set
Jquery-based cross-Origin data transmission (JSONP). For more information, see. Backend:
The Code is as follows:
$ Json_str = json_encode (array ("ddd" => "11111111 "));Echo $ _ GET ['ja '].' ('. $ json_str .')';?>
Front end:
The Code is as
The main method is to implement the optical mark Locating Method in textarea. Considering the compatibility of multiple browsers, you can refer to the following for more information. Today, I am working on a blog forwarding function. Just like the
When it comes to Javascript class inheritance, prototype chain is inevitable, but inheritance implemented only through prototype chain has many defects. No parameter class inheritance issues
Let's take A look at the sample code to implement B
For details about how to always display the Div in the middle of the screen, refer.
1. display in the middle. (See: sky100articles1790515)
The Code is as follows:
. OrdersearchDivCss{Position: absolute;Z-index: 100;Display: block;Background-color:
The push and unshift methods of Array can add elements to the current Array. The difference is that push is added at the end, while unshift is added at the beginning. From the principle, we can know that the unshift efficiency is low. The reason is
Window. event. clientX and window. event. clientY captures the coordinates of the mouse relative to the desktop of the window when the current event occurs. Normally, the IE close button is located in the upper right corner of the page, so when the
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