In my form I have several textboxes like txtItemCode1
, txtItemCode2
, etc.
I use this code to perform some action if I press enter on any of these, but I want to get the selected textbox id. How can I do that?
variable id should have what you are looking for.
$('input[type="text"]').change(function(){
var id = $(this).attr('id');
});
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