jQuery 报错 Uncaught Error: Syntax error, unrecognized expression
jquery.min.1.8.3.js:2 Uncaught Error: Syntax error, unrecognized expression: a:not([href]),a[href=],a[href*=#]
at Function.fa.error (jquery.min.1.8.3.js:2)
at fa.tokenize (jquery.min.1.8.3.js:2)
at fa.select (jquery.min.1.8.3.js:2)
at Function.fa [as find] (jquery.min.1.8.3.js:2)
at n.fn.init.find (jquery.min.1.8.3.js:2)
at new n.fn.init (jquery.min.1.8.3.js:2)
报错行:$('a:not([href]),a[href=],a[href*=#]').attr('href', 'javascript:;');
问题分析:
逗号写成了中文逗号,
,必须为英文逗号 ,