IE6, IE7, IE8 CSS, JS compatible

Source: Internet
Author: User

When you view Web pages that use Microsoft JScript in Internet Explorer 6, you may experience slow Web browser performance issues. The reason is that if the JS script creates a large number of variables at the same time, the JScript engine performs a garbage collection algorithm that monitors the number of variable allocations in the script, the number of literal values used in the script, and the total size of the string values allocated in the script, and if the thresholds for these values are exceeded, garbage collection occurs. The garbage collection process interrupts the running script. As a result, these running scripts will be suspended until garbage collection is complete.

IE6 , IE7 , IE8 The difference between CSS and JS :

1, IE8 in the CSS about width or height if you use the pixel form as an argument, the parameter must be "px", and this parameter must be greater than 0, and in IE6 and IE7 is supported without "px" parameter, and the parameter can be a negative number.

2, such as: style=height:180px\\0; only IE8 can recognize, Style=height:180px\\9,ie can recognize.

2, IE8 in the CSS "Border-style:outset;" is not effective.

3. The distance between unordered lists in IE8 is much larger than IE6 and IE7.

4, IE6 can recognize *, but do not recognize!important,ie7 can recognize * can also identify!important.

5, IE6 support underline, IE7 does not support underline.

6. In IE8, the value of event.x in an IFRAME is not the relative x-coordinate of the IFRAME, but the x-coordinate of the outermost window, but Event.y is the relative y-coordinate of the IFRAME. In IE6 and IE7, Event.x and event.y are all relative coordinates in the IFRAME, which can be replaced by EVENT.CLINETX.

7. Function objects in JavaScript in IE8, for example:

function A () {alert ("HelloWorld");}

var fun = new Function (' ', ' HelloWorld ');

alert (fun);

The value returned at this time is function anonymous () {function A () {alert ("HelloWorld")}}, and the value returned in IE6 and IE7 is function anonymous () {alert (" HelloWorld ")}, that is, when the second parameter of the function is the IE8 of the function, and IE6 and IE7 are the internal code of the function (not including" function A () {"and"} "for this parameter. The function head and tail).

8, in IE6, use Window.status = "Welcome to my Blog!!!" , you can display this line in the status bar, but in IE7, the default is not to allow the script to update the status bar in IE7 's security settings.

9. IE8 will test the ie6,7,8 with css :

test Code: Style Code: p {color: #f00;} xhtml Code:  

Text

IE6

IE7

IE8

Note

P{_color:red}

X

X

IE6 dedicated

*html p{color: #red;}

X

X

IE6 dedicated

P{+color:red}

X

ie6,7 dedicated

P{*color:red}

X

ie6,7 dedicated

*html p{color:red;}

X

ie6,7 dedicated

P{*+color:red}

X

X

IE7 dedicated

Body> p{color:red}

X

Shielding IE6

/*\\*//*/p{+color:red}/**/

X

X

IE8 dedicated

p{/*/*/color;/**/}

X

Shielding IE8

P{color:red!important}

P{color:red}

can be used

Html>/**/body. Head{color: #red;}

X

X

only to IE8

for IE8 new features for js :

1, IE8 began to support a number of new specifications, including Queryselector and queryselectorall more than two functions

2, IE8 introduced xdomainrequest cross-station data acquisition function. This is a very interesting feature of cross-site data acquisition, but it doesn't work the same way as the cross-site XMLHttpRequest in Firefox 3. Its cross-domain is not unlimited. Requires the server to return HTTP headers with xdomainrequestallowed=1 in order to cross the domain, otherwise it is unsuccessful. XMLRequest can not cross the station has been a multi-subdomain server mishap. This makes it possible to consider the most primitive dynamic script and JSON methods. But the IE8 team is deliberately addressing the problem of cross-site access to data, which is a step forward for IE8. In addition, the XMLHttpRequest of IE8 adds an important attribute timeout and OnTimeOut method, which is extremely important when optimizing a program.

3. getElementById can return objects by ID. GetAttribute ("checked") now returns "Checked" instead of true. A radio button that is dynamically created (or modified) can now be selected.

Support for more features of HTML5:

1, Window.location.hash. This feature has been very well supported by most browsers. Navigating the changes in Window.location.hash in IE8 Standard mode and saving the URL of the previous document can mimic the back button effect in an AJAX application. It has been improved in IE8 to broadcast this hashchanged time.

2, Dom storage. With this feature, the data can be persisted locally, and it will replace the original cookie stored in the DOM.

3, PostMessage. IE8 now supports cross-file message communication (Cross-document MESSAGING-XDM)! With the OnMessage event and the PostMessage method, two Web pages from different domains can communicate. This feature is currently supported in IE8, Opera 9, Firefox 3, and WebKit nightlies, which means that the feature is almost supported by all the latest browsers.

4, Offline Events. There are some offline events in IE 8 to detect the interruption of the network, through which we can write wonderful offline Ajax applications. Currently, browsers that support this feature include Firefox3 and IE8.

480-minute timeout error when using Firefox or Chrome to log on to the minimum system

IE6 Bugs

1. Style settings <abbr> elements are not supported

2. Class and ID names beginning with hyphens and underscores are not supported

3, <select> elements always appear on the top of the stack, ignoring the Z-index value

4, if the pseudo-class of the anchor point is not in the correct order (: Link,: visited,: hover),: hover pseudo class will be invalid

5. The!important declaration of a property is overwritten by a second declaration of the same attribute in the same rule that does not use!important.

6, height performance similar to Min-height, width performance similar to Min-width, left and right margin double

7. Dot border (dotted) looks like a dashed border (dashed)

8, Text-decoration Line-through value in the text looks higher than other browsers

9, ordered list if there is a fixed structure (Haslayout is true, can not set the Li height/width/zoom such as activation haslayout value), the sequence number will not increase, but to remain 1

10. List element does not support all available values of List-style-type

11. If the list entry floats, the specified list-style-image will not be displayed

12, not fully support @font-face

13. Some selectors will incorrectly match comments and document declarations

14. If an ID selector does not match a class selector, the same ID selector, combined with a different class selector, will also be treated as a mismatch.

IE7 bugs

1 , ordered list if there is a fixed structure (Haslayout is true, you cannot set the value of the active haslayout such as Li's height/width/zoom, etc.), the sequence number will not increase, but remain at 1

2. List element does not support all available values of List-style-type

3. If the list entry floats, the specified list-style-image will not be displayed

4, not fully support @font-face

5. Some selectors will incorrectly match comments and document declarations

IE8 new JavaScript functions: refer to Http://blog.csdn.net/WinGeek/archive/2009/02/26/3937909.aspx.

Original reference: Http://www.cnblogs.com/hoojo/archive/2011/01/13/1934373.html

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.