if (document.documentElement.contains ) {
Sizzle.contains = function( a, b ) {
return a !== b && (a.contains ? a.contains(b) : true); // error in
this line
};
}
else if ( document.documentElement.compareDocumentPosition ) {
Sizzle.contains = function( a, b ) {
return !!(a.compareDocumentPosition(b) & 16);
};
}
else {
Sizzle.contains = function() {
return false;
};
}
注释行正在抛出错误。当我搜索某些东西时,如果它们没有匹配的记录,它将不显示任何结果。当我再次清除文本框中的每个字符时,它将开始搜索。所以当时我遇到了这种类型不匹配的错误
答案 0 :(得分:0)
Type mismatch
is a common error of IE8 when it working in a weird mode. You can try this things :
Check if IE8 is in compatibility mode. If yes, disable it and put it in normal mode
Check the doctype of you html. It must be <!DOCTYPE html>