我有一个从购物车中删除产品的链接,适用于IE7-IE9以外的所有浏览器。
我在IE控制台日志中收到此错误:
SCRIPT87: Invalid argument.
jquery.min.js, line 4 character 7871
脚本:https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js
它的工作方式有点像手风琴,当删除时它“向上滑动”并且看起来这种jquery效果正在引起它。发生此错误时,也不会删除产品。我现在一无所知,任何人都有任何想法?
修改
if ( document.documentElement.currentStyle ) {
currentStyle = function( elem, name ) {
var left, rsLeft, uncomputed,
ret = elem.currentStyle && elem.currentStyle[ name ],
style = elem.style;
// Avoid setting ret to empty string here
// so we don't default to auto
if ( ret === null && style && (uncomputed = style[ name ]) ) {
ret = uncomputed;
}
// From the awesome hack by Dean Edwards
// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
// If we're not dealing with a regular pixel number
// but a number that has a weird ending, we need to convert it to pixels
if ( !rnumpx.test( ret ) && rnum.test( ret ) ) {
// Remember the original values
left = style.left;
rsLeft = elem.runtimeStyle && elem.runtimeStyle.left;
// Put in the new values to get a computed value out
if ( rsLeft ) {
elem.runtimeStyle.left = elem.currentStyle.left;
}
style.left = name === "fontSize" ? "1em" : ( ret || 0 );
ret = style.pixelLeft + "px";
// Revert the changed values
style.left = left;
if ( rsLeft ) {
elem.runtimeStyle.left = rsLeft;
}
}
return ret === "" ? "auto" : ret;
};
}
错误发生在:
style.left = name === "fontSize" ? "1em" : ( ret || 0 );