I am currently practicing JavaScript.
I use jQuery below.
<script src="js/jquery-3.2.1.min.js"></script>
I would like to obtain the name of the input when the text is entered in the input text area of the form (keyup timing). Is there any way?
I would appreciate it if you could let me know if anyone knows.
$('input').on('keyup', function(){
// I'd like to get the name of the target input here.
// I looked into various things, but I couldn't find them at all.
});
Attribute="name" value can be taken as $(this).attr.
var attribute=$(this).attr("name");
© 2024 OneMinuteCode. All rights reserved.