如何解决IE8中的这个错误?错误是Microsoft JScript运行时错误:对象不支持属性或方法'getComputedStyle' [英] How to solve this error in IE8? The error is Microsoft JScript runtime error: Object doesn't support property or method 'getComputedStyle'

查看:277
本文介绍了如何解决IE8中的这个错误?错误是Microsoft JScript运行时错误:对象不支持属性或方法'getComputedStyle'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在IE8中解决此错误?错误是Microsoft JScript运行时错误:对象不支持属性或方法'getComputedStyle'



请在下面找到代码段。我需要在IE8中工作。请帮忙。



函数loadPseudoElement(元素,类型){

var style = window.getComputedStyle(element,type),
content = style.content;

if(content.substr(0,3)=== url){

methods.loadImage(_html2canvas.Util .parseBackgroundImage(content)[0] .args [0]);

}

loadBackgroundImages(style.backgroundImage,element);

}

How to solve this error in IE8? The error is Microsoft JScript runtime error: Object doesn't support property or method 'getComputedStyle'

Please find below the code snippet. I need same to be work in IE8. Please help.

function loadPseudoElement(element, type) {
var style = window.getComputedStyle(element, type),
content = style.content;
if (content.substr(0, 3) === url) {
methods.loadImage(_html2canvas.Util.parseBackgroundImage(content)[0].args[0]);
}
loadBackgroundImages(style.backgroundImage, element);
}

推荐答案

检查这个..



http://stackoverflow.com/questions/11161607/jquery-error-in-ie8-object-doesnt -support-this-property-or-method [ ^ ]
check this..

http://stackoverflow.com/questions/11161607/jquery-error-in-ie8-object-doesnt-support-this-property-or-method[^]


这篇关于如何解决IE8中的这个错误?错误是Microsoft JScript运行时错误:对象不支持属性或方法'getComputedStyle'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆