ie兼容总结javascript
一、页面必须编写规范html
二、页面须要添加html5
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/>
大体意思是谷歌对ie作的兼容java
三、引入如下的js文件chrome
<script> var ie_script=function(src){ return "\<script type\=\"text/javascript\" src\=\""+src+"\"\>\<\/script\>"; }; if(!document.addEventListener){ document.write(ie_script('http://192.168.77.28:8089/EMS/shanlv/IE8/es5/es5-shim.min.js')); document.write(ie_script('http://192.168.77.28:8089/EMS/shanlv/IE8/html5/dist/html5shiv.min.js')); document.write(ie_script('http://192.168.77.28:8089/EMS/shanlv/IE8/Respond/dest/respond.min.js')); document.write(ie_script('http://192.168.77.28:8089/EMS/shanlv/IE8/pie/PIE.js')); } </script>
若是是bootstrap 页面在写栅格的时候必须写完整,特别是col-xs-3,不写的会出现换行,宽度不一致,由于ie会默认按照窄屏的方式渲染bootstrap