html - javascript - how to implement `not` in querySelector? -
quick question: let's have 2 different types of <button>
,
first 1 looks this: <button class="test">
second looks this: <button class="test" disabled="disabled">
.
now, how can 1 achieve selection of disabled button without selecting activated
button? cause if go class, queryselector
both of them. there way implement kind of logic selection made queryselector
?
something maybe -> "select button class 'test' , not attribute 'disabled'"
?
thanks in advance.
the same way in other selector. the negation pseudo-class.
:not([disabled])
Comments
Post a Comment