Can anyone tell me why is it used and what will it produce in brief
$(this).val();
also explain var dataString = 'state_id='+ id;
Here is the full code
$(document).ready(function(){
$(".state").change(function(){
var id=$(this).val();
var dataString = 'state_id='+ id;
$.ajax({
type: "POST",
url: "city_names.php",
data: dataString,
cache: false,
success: function(html)
{
$(".city").html(html);
}
});
});
});
Thanks in advance.