怎么获得当前点击的按钮的id名?
<body>
<input id="t1" type="button" value='fff'>
<input id="t2" type="button" value='fff'>
<input id="t3" type="button" value='fff'>
<input id="t4" type="button" value='fff'>
<script type="text/javascript">
$(document).ready(function(){
$('input').each(function(){
alert($(this).attr('id'));
});
});
</script>
</body>