重置之前使用$ _POST变量填充的表单字段

I would like to just reset the fields populated with $_POST variables which can be dropdown, textbox, radio etc.. because the usual html reset button cant do it

my jquery code goes like this

$("#resetBtn").click(function(){
  foreach($('#kensakuform').elements as obj)
  {
    if(obj.value)
        obj.value = '';
  }
}); 

it doesn't work and the tables i set with odd rows colored suddenly got conflict with this

$("#resetBtn").click(function(){
    $('#kensakuform').trigger('reset');
});

or

$("#resetBtn").click(function(){
    $('#kensakuform')[0].reset();
});