on my page I have many label
tags. Some of them has the for
attribute. How should be the jQuery's selector of that label's ?
试试这个: $('label[for]')
如果你不知道什么是等于for
A selector like this one will be helpful :
$('label[for="foo"]').css('color', 'red);
EDIT after comment :
To select all labels without knowing the for
value :
$('label[for]').css('color', 'red);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.