IE9 抛出 JavaScript 错误:SCRIPT5007:属性 'getComputedStyle'
IE9 throws JavaScript Error: SCRIPT5007: The value of the property 'getComputedStyle' is null or undefined, not a Function object
Telrik.web.webresource.axd 文件抛出"SCRIPT5007:属性'getComputedStyle'的值为空或未定义,而不是函数对象"错误。它适用于其他浏览器。任何人都可以建议我如何处理硬编码。
一般来说,
getComputedStyle
是现代浏览器中使用的JavaScript函数。例如,它允许您从隐藏元素中获取尺寸。
也就是说,如果您的浏览器无法识别该功能,则需要一个 polyfill 来增强您的浏览器使用此功能。
通常,使用此函数的 js 库应该提供 polyfill。如果不是这种情况,请自行添加。
https://github.com/jonathantneal/Polyfills-for-IE8/blob/master/getComputedStyle.js