我正在尝试使用 condole 选项卡下的 chrome 开发工具来查找 jquery 路径/选择器。我有以下 HTML:
<p class="lead">More complex content example:</p>
<div id="tab" class="btn-group" data-toggle="buttons-radio">
<a href="#prices2" class="btn btn-large btn-info active" data-toggle="tab">Prices</a>
<a href="#features2" id="2" name="button1" class="btn btn-large btn-info" data- toggle="tab">Features</a>
<a href="#requests2" id="2" name="button2" class="btn btn-large btn-info" data-toggle="tab">Requests</a>
我尝试使用以下方法查找“a”选择器:
$ .a
undefined
$a
ReferenceError: $a is not defined
$.a
undefined
$[a]
ReferenceError: a is not defined
$(a)
ReferenceError: a is not defined
$[a]
ReferenceError: a is not defined
$.[a]
SyntaxError: Unexpected token [
$.(a)
如您所见,它不起作用。我需要做什么才能找到正确的选择器路径?