开发者

Jquery selector question for form labels

I'm trying to make a selector using form labels.

$("label:not[for='other']")
$("label[for='other']")

<label for="other">
<label for="somethingElse">

If someone selects the label for 'other', do somethin开发者_StackOverflowg. If they pick a label for anything that isn't 'other' do something else.


You can do $("label[for!='other']") to select the labels that do not have the for attribute set to 'other'.


Use:

$("label:not([for='other'])")

or:

$("label[for!='other']")
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜