jquery ottenere id elemento
$(this).attr('id')
ottieni id da questo jquery
alert($(this).attr('id'))
ottieni elemento per id jqueryt
$( "#myDiv" )
ottieni elemento per id in Jquery
$("#YourElementId").val();
jquery ottieni elemento per id
<script>
$(document).ready(function(){
$("#myBtn").click(function(){
var elmId = $("#test").attr("id");
alert(elmId);
});
});
</script>
<body>
<div id="testDiv">Data of the Div</div>
<br>
<button type="button" id="myBtn">Show Div ID</button>
</body>
jquery ottenere id
var myId = $("#test").prop("id");