由于项目要要兼容到ie8原本没有问题的代码一但用ie8打开js的报错找不到对象就都来了,其实总结起来就是ie越老的版本就越多方法名识别不到,那就少什么方法添加什么,比如说我的项目就要引入<script src="js/respond.min.js"></script>来解决 bootstrap中样式js找不到,ajax在ie8及以下的版本用不了就(crossDomain:false)跨域关掉,有的人说是把(cache:false)可能我的页面没有遇到这类问题这个设置没有用。

respond.min.js代码如下:

/*! Respond.js v1.4.2: min/max-width media query polyfill * Copyright 2013 Scott Jehl
* Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT
* */

!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.,b)}}(this);

 

相关文章:

  • 2021-06-08
  • 2022-12-23
  • 2021-10-10
  • 2022-12-23
  • 2021-11-24
  • 2022-12-23
猜你喜欢
  • 2021-10-26
  • 2022-12-23
  • 2022-12-23
  • 2022-01-29
  • 2021-07-07
  • 2021-07-17
  • 2021-06-15
相关资源
相似解决方案