jQuery dapatkan ID elemen
$(this).attr('id')
Thoughtful Tortoise
$(this).attr('id')
//Get
var bla = $('#txt_name').val();
//Set
$('#txt_name').val(bla);
var myId = $(this).attr('id');
alert( myId );
//for imput field given in HTML
<input type="text" id="myid" class="myclass" >
// Using ID to find value
$("#myid").val();
// Using Class to find value
$(".myclass").val();
$( "input" )
var value = $( this ).val();
$("#textInput").val() // To get value of element textInput