jQuery从点击的div获取ID

I have a html structure like this

 <div class='mydiv' id='89'>hello</div>
 <div class='mydiv' id='123'>hihihi</div>

And my jQuery is currently like this

$('.mydiv').click(function(){
$.ajax({
     type: "POST",
     url: 'getdata.php',
     data: { uid: "UNKNOWN" }
     success: function(data) {
     $('#o').html(data);
     $('#o').fadeIn("fast");
    }
    });
    });

What i need is to fill in the UNKNOWN in the data for jQuery with the id from the div that was clicked

Thanks,

You could use this.id to get the id.

$('.mydiv').click(function () {
    $.ajax({
        type: "POST",
        url: 'getdata.php',
        data: {
            uid: this.id
        },
        success: function (data) {
            $('#o').html(data);
            $('#o').fadeIn("fast");
        }
    });
});