jquery form elements

jquery form elements

Hi,

I have a variable which contains html form name, and this variable gets updated dynamically. How do i loop all the form elements which has id parameter and get values of those elements using jquery?

Thanks,