how to reset form in firefox browser by javascript
<p>I want to reset form in firefox browser. When I use previous function in back button, the page is not reset for hidden field. It has previous stage. So, How do I?</p>

<pre><code>&lt;Html&gt;
 &lt;Head&gt;
  &lt;Title&gt;My Testing for javascript&lt;/Title&gt;
  &lt;Script type="text/javascript"&gt;
   function hidetext(){
    window.alert('Start save to hidden');
    document.getElementById('hid').value = document.getElementById('puttextbox').value;
    window.alert('Complete save to hidden');
    document.getElementById('puttextbox').value='';
   }

   function displaytext(){
    window.alert('Start display from hidden');
    document.getElementById('displaytextbox').value = document.getElementById('hid').value;
    window.alert('Complete display from hidden');
   }

   function resetform(){
    document.getElementById('form1').reset();
    window.alert('reset is completing.....');
   }

  &lt;/Script&gt;
 &lt;/Head&gt;
 &lt;Body&gt;
  &lt;form id="form1"&gt;
  &lt;div&gt;
   Type your hidden text &amp;nbsp;&amp;nbsp;&lt;input type="text" id="puttextbox"/&gt;
   &lt;br/&gt;
   Display your hidden text &amp;nbsp;&amp;nbsp;&lt;input type="text" id="displaytextbox"/&gt;
   &lt;br/&gt;
   &lt;input type="hidden" id="hid"/&gt;
   &lt;button type="button" id="putbutton" onclick="hidetext();"&gt;Put the textbox&lt;/button&gt;
   &lt;button type="button" id="displaybutton" onclick="displaytext();"&gt;Display hidden text&lt;/button&gt;
   &lt;button type="button" id="resetbutton" onclick="resetform();"&gt;Reset&lt;/button&gt;
  &lt;/div&gt;
  &lt;/form&gt;
 &lt;/Body&gt;
&lt;/Html&gt;
</code></pre>
