用jquery a[href=/Bill/Index] href里面有斜杠 就获取不到对应的a标签了 怎么写才能获取啊 10
比如varpathname='/Account/Index';varuNav=$('#uNav');uNav.find('a[href='+pathname+']').a...
比如
var pathname = '/Account/Index';
var uNav = $('#uNav');
uNav.find('a[href=' + pathname + ']' ).addClass('current');
然后报错Uncaught Error: Syntax error, unrecognized expression: a[href*=/Account/Index]
怎么才能正确的获取到a标签呢 展开
var pathname = '/Account/Index';
var uNav = $('#uNav');
uNav.find('a[href=' + pathname + ']' ).addClass('current');
然后报错Uncaught Error: Syntax error, unrecognized expression: a[href*=/Account/Index]
怎么才能正确的获取到a标签呢 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询