resetting multi element/controll form using jquery

 function resetForm($form) {  
   $form.find('input:text, input:password, input:file, select, textarea').val('');  
   $form.find('input:radio, input:checkbox')  
      .removeAttr('checked').removeAttr('selected');  
 }  
 // to call, use:  
 resetForm($('#myform')); // by id, recommended  
 resetForm($('form[name=myName]')); // by name  

source : http://stackoverflow.com/questions/680241/resetting-a-multi-stage-form-with-jquery

Comments

Popular posts from this blog

flexigrid + php with add and edit button

Data Flow Diagram (DFD)

VERIFIKASI SUARA MENGGUNAKAN METODE MFCC DAN DTW MENGGUNAKAN METODE MFCC DAN DTW (BAB II TINJAUAN PUSTAKA)