This chapter is a summary of the IE8 compatibility issues encountered during Web page development.
It's too much of a hole, repeatedly stepping on the pit, always have no memory. And the more pit is IE8 developer tool is too difficult to use, want to debug all debug not come out.
Had to record down, the next problem is good for easy troubleshooting.
JS script, you must follow the following rules, otherwise all will cause JS script in IE8 error.
1. After the statement of all JS scripts is finished, you must end with a semicolon.
2. When declaring or assigning arrays (array) objects, be aware that you cannot have extra commas (,) such as:
var arrnum = [1,2,4,];var arrstr = [ {key:1}, {key:2},];
3.json Object declaration or assignment, also cannot have extra comma (,), such as:
var jsonobj = { key: "111", Value: "222222",};
4. When the event is bound, it is best to use jquery for binding instead of using the OnClick event directly. The reasons for this need to be investigated. Such as:
-------------recommended Way-----------------------<div class= ' button ' ></div><script> $ (". Button"). Click (function () { alert (1111111); }); </script>---------------Not recommended--------------------<div class= ' button ' onclick= ' alert (3333333); ' ></div>
"Javascript" IE8 compatibility issues Summary