I need to select all input type texts
that don't have a particular class.
This is what I tried without success:
$('input.text:not(.fld-required-' + val + ')').each(function() {
$(this).val('');
});
UPDATE
This is one input text I have that is not be selected:
<input placeholder="my_input" class="fld-required fld-required-1" name="my_input" type="text" required="">
You do not have a text
class assigned to your input element.
You can use the attribute selector :
$('input[type="text"]:not(.fld-required-' + val + ')').each(function() {
$(this).val('');
});
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.