I had working code that could reset my form when I click on a reset button. However after my code is getting longer, I realize that it doesn\'t work anymore.
I use this simple code:
//reset form $("#mybutton").click(function(){ $("#myform").find('input:text, input:password, input:file, select, textarea').val(''); $("#myform").find('input:radio, input:checkbox').removeAttr('checked').removeAttr('selected'); });