Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
<ul> <li class="selected cell">test</li> <li class="cell">test2</li> </ul>
如何仅选择 .selected .cell 元素?
Y.one('.selected, .cell') <= 这会选择两个 li 元素。我只想选择第一个
有没有类似的东西?Y.one('.cell').one('.selected') ???
.selected.cell
注意它们之间没有空间。