如何通过单击按钮重置表单并刷新数据表?

I have a button with id="reset", So when the button is clicked I want to do two things:

  1. The form has to be reset.
  2. Refresh the datatable.


Js/jQuery:

$("#reset").click(function(){
    $("myform").reset();
    var oTable = $('#documentreport').dataTable();
    oTable.fnDraw();
}

This is what I have tried so far. Any help would be appreciated

refresh database:

Calling $('#table').dataTable().fnDestroy(); will clear the table of dataTable code and allow you to manipulate the table, and then call dataTable on it again.

Reset form: http://jsfiddle.net/8zLLn/

  $('#reset').click(function(){
        $('#myform')[0].reset();
  });

very well answered by shmuel613 and tadiou thank you both.