jquery button id value code example
Example 1: get the id of a div in jquery
var rid = $(this).attr('id'); //for dynamically created elements
Example 2: get element by id in Jquery
$("#YourElementId").val();
var rid = $(this).attr('id'); //for dynamically created elements
$("#YourElementId").val();