List all form element with their properties
<p>i want to list all form elements with their properties  with jquery , i write this code , it works for element index 0 in form , but for other elements page will refresh and ... !
here is my code :</p>

<pre><code>$(document).ready(function(){
   $("form#registerForm").submit(function(){
        var allInputs = $("form#registerForm :input");
        $.each(allInputs, function(index, field) { 
            $("#res").append(index + " :: " + field + "&lt;br /&gt;");
            $.each(field, function(pIndex, pValue) { 
                $("#res").append(pIndex + " :: " + pValue + "&lt;br /&gt;");
            });
        });
    return false;
    });
});
</code></pre>

<p>thanks for your help :)</p>
