Set default values for input objects
<p>I use the code below to set default values for input objects. This works fine for text inputs but <code>select</code> dropdowns, radio buttons and check boxes are not reset to their default values.</p>

<p>How can I solve this?</p>

<pre><code>function ResetForm(form) {

    $(":input", form).not(":button, :submit, :reset, :hidden").each(function () {
        this.value = this.defaultValue;
    });

}
</code></pre>

<p>p.s. I use this method to reset inputs which are in a <code>div</code> node; I pass the <code>div</code>'s id into this function.</p>
