The JSP reset button empties the incoming form data instance

  • 2021-07-06 11:33:18
  • OfStack

Reference:

jquery Form Empty


$(':input','#myform') 
.not(':button, :submit, :reset, :hidden') 
.val('') 
.removeAttr('checked') 
.removeAttr('selected');

This js can empty the values filled in and passed in the form, but note that:

1. jq implementation, which < input / > Can't be placed in form form! ;

2. Write it directly in the onclick attribute


Related articles: