当我加载页面时,在 IE 8 中读取此错误:
Agente utente: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E) Timestamp: Fri, 27 Apr 2012 18:38:27 UTC
Messaggio: Syntax error, unrecognized expression: first-of-type Linea: 3 Carattere: 14659 Codice: 0 URI: http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js
在 Firefox、Chrome 和其他浏览器中都可以!
最佳答案
:first-of-type
不是 jQuery 选择器。 :first-of-type
仅适用于 native 支持此选择器的浏览器。
对于其他浏览器,扩展选择器集 ($.expr[':']
)。看看this project 。 jquery-extra-selectors.js添加了对多个伪类选择器的支持。
关于jquery - IE 8问题: unrecognized expression: first-of-type,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10357670/