js browser compatibility issues

First, understand the next browser

Non-standard browser: ie6 ie7 ie8 ie9 etc.

Standard browser: chrome ie10 ie11 Firefox safari etc.

Common browser compatibility issues:

  • HTML problem
  • CSS problem
  • JavaScript problem

1. Browser Compatibility Issues

There browser on the market are many, of course, not the same core browser, a different browser when parsing code page rendering effects are inconsistent.

 

2.IE9 following browsers can not use the Opacity

Solution:

    Under standard browser: Opacity: 0.5;

    Nonstandard browser: filter: alpha (opacity = "50")

 

3.ie8 the browser does not support the event object

Solution:

  • var event = event or window.event
  • Use srcElement objects

 

Guess you like

Origin www.cnblogs.com/lichenfei/p/12458103.html