我正在尝试构建一个程序,一旦页面加载,它就会自动添加大小。我在 ul 中有一堆 li 标签,我想知道如何使用 JQuery 访问这些 li 标签。
我通常会使用 Document.getByName 但 ul 没有 id。
这是完整的代码:
<div class="exp-pdp-size-dropdown-container selectBox-options exp-pdp-size-dropdown exp-pdp-dropdown selectBox-dropdown-menu" style="display: block; top: 38px; left: 0px;">
<a class="selectBox exp-pdp-size-dropdown exp-pdp-dropdown selectBox-dropdown selectBox-menuShowing" style="display: inline-block;" title="" tabindex="0"><label class="exp-pdp-dropdown-label platform-font-1">SIZE</label><span class="selectBox-label"> </span><span class="selectBox-arrow glyph-replace" data-glyph="j"></span></a>
<ul class="selectBox-options exp-pdp-size-dropdown exp-pdp-dropdown" style=""><li class="exp-pdp-size-not-in-stock selectBox-selected" style=""><a rel=""></a></li><li class="exp-pdp-size-not-in-stock first-in-row upper-left"><a rel="3488377:6">
6
</a></li><li class="exp-pdp-size-not-in-stock"><a rel="3488378:6.5">
6.5
</a></li><li class="last-in-row upper-right"><a rel="3488379:7">
7
</a></li><li class="first-in-row"><a rel="3488380:7.5">
7.5
</a></li><li class=""><a rel="3488381:8">
8
</a></li><li class="last-in-row"><a rel="3488382:8.5">
8.5
</a></li><li class="first-in-row"><a rel="3488383:9">
9
</a></li><li class="exp-pdp-size-not-in-stock"><a rel="3488384:9.5">
9.5
</a></li><li class="last-in-row"><a rel="3488385:10">
10
</a></li><li class="first-in-row"><a rel="3488386:10.5">
10.5
</a></li><li class=""><a rel="3488387:11">
11
</a></li><li class="last-in-row"><a rel="3488388:11.5">
11.5
</a></li><li class="first-in-row"><a rel="3488389:12">
12
</a></li><li class="exp-pdp-size-not-in-stock"><a rel="3488390:12.5">
12.5
</a></li><li class="last-in-row"><a rel="3488391:13">
13
</a></li><li class="first-in-row lower-left"><a rel="3488392:14">
14
</a></li><li class="exp-pdp-size-not-in-stock last-in-row lower-right"><a rel="3488393:15">
15
</a></li></ul></div>