[英]'Object doesn't support this property or method' IE8 throwing jquery error
在IE8上加載網站時,我在頁面上收到此錯誤,
消息:對象不支持此屬性或方法行:1025字符:5代碼:0 URI: http : //www.domain-name.com/../default/js/jquery.wt-rotator.js
即這行代碼
$innerText.width(textWidth).html($p.html());
這是完整的代碼塊
var initTextData = function($item, padding)
{
var $p = $item.find(">div:hidden"); var textWidth = getPosNumber(parseInt($p.css("width")) - padding, 300);
var textHeight = getPosNumber(parseInt($p.css("height")) - padding, 0); $innerText.width(textWidth).html($p.html());
if (textHeight < $innerText.height())
{ textHeight = $innerText.height();
}
$item.data("textbox", {x:$p.css("left"), y:$p.css("top"), w:textWidth + padding, h:textHeight + padding, color:$p.css("color"), bgcolor:$p.css("background-color")});
}
jQuery圖像旋轉器不會在IE8歌劇中顯示或加載,而在Firefox中則可以完美加載和運行。
我認為問題只是在$ innerText中。
為什么在innerText之前需要“ $”符號?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.