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

Review Pemakaian Lenovo K900 Mati Total (Matot)

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

VERIFIKASI SUARA MENGGUNAKAN METODE MFCC DAN DTW MENGGUNAKAN METODE MFCC DAN DTW (BAB III METODE DAN PERANCANGAN SISTEM)