$(document).ready(function(){ $('form').each(function(){ alert($(this).attr('id')); // or simple this.id }) })