对象没有';不支持此属性或方法javascript错误
我在IE8中遇到一个“对象不支持此属性或方法”错误。firefox中没有错误 有人知道是什么引起的吗对象没有';不支持此属性或方法javascript错误,javascript,internet-explorer,Javascript,Internet Explorer,我在IE8中遇到一个“对象不支持此属性或方法”错误。firefox中没有错误 有人知道是什么引起的吗 <script type="text/javascript"> function callReport() { var sPath = $('input[name*="ReportPath"]').val(); window.open(sPath); } $('div:last div.active').qtip({ c
<script type="text/javascript">
function callReport() {
var sPath = $('input[name*="ReportPath"]').val();
window.open(sPath);
}
$('div:last div.active').qtip({
content: 'This is an active div element',
show: 'mouseover',
hide: 'mouseout'
})
</script>
函数callReport(){
var sPath=$('input[name*=“ReportPath”]”)。val();
窗户。打开(sPath);
}
$('div:last div.active').qtip({
内容:“这是一个活动的div元素”,
显示:“鼠标悬停”,
隐藏:“鼠标出”
})
看起来qTip使用了一个名为tooltip
的全局变量,这可能偶尔会导致IE8出现问题(可能只是在严格模式下)。在使用qTip的JS文件顶部声明window.tooltip=null
,为我解决了这个问题,并更清楚地表明变量存在。在IE8调试器中,它显示哪一行作为异常源?我唯一能想到的是window.open()
调用,但我不认为虚假的URL会导致这种错误。可能是在qtip内部?我不知道这个插件。最近在qtip论坛上有一些提到IE8特定的bug和修复。你有最新版本吗?你在jQuery之后包含了qtip库,对吗?@ianpgall Firefox中没有错误,所以我想是的。