我目前正在研究围巾
我当前代码的全部看起来像这样
contextSelector = 'a[href^="/clubs-and-societies/academic/';
(此方法有效)
但是有多个页面可供选择,但是没有多个ContextSelector不能工作
contextSelector = 'a[href^="/clubs-and-societies/academic/';
contextSelector = 'a[href^="/clubs-and-societies/culture/';
contextSelector = 'a[href^="/clubs-and-societies/dance/';
(不起作用)
解决方案是什么?
1)您的语法格式不正确。应该是:
contextSelector = 'a[href^="/clubs-and-societies/academic/"]';
((请注意,双引号"
和右方括号]
。]
2)CSS中的逻辑OR
是逗号,
:
contextSelector = 'a[href^="/clubs-and-societies/academic/"], a[href^="/clubs-and-societies/culture/"], a[href^="/clubs-and-societies/dance/"]';