I know I can get any change event on one form by using this code:
$("#testForm :input").change(function() {
console.log($(this).attr('name'));
});
How would I get it if I have multiple forms?
Either do something like that which will get all changes to all form inputs, or give each separate form an ID.
$("form :input").change(function() {
console.log($(this).attr('name'));
});
$("form :input").change(function() {
console.log($(this).attr('name'));
});
for all forms, but if you still want only that one form
$("#testForm :input").change(function() {
console.log($(this).attr('name'));
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With