javascript - reset webpage to its initial state -


i have written clear function supposed clear map , combo box. want reset webpage initial state. have tried app.restart()

app.restart = function() {         var child,         child_process = require("child_process"),         gui = require('nw.gui'),         win = gui.window.get();         if (process.platform == "darwin")  {             child = child_process.spawn("open", ["-n", "-a", process.execpath.match(/^([^\0]+?\.app)\//)[1]], {detached:true});        } else {             child = child_process.spawn(process.execpath, [], {detached: true});        }         child.unref();         win.hide();         gui.app.quit(); }  

but nothing works. not need reload function. can tell how reset webpage initial state?

follow 1 of this:

1.prevent page caching (with response headers server); 2.clear fields each time page loaded javascript. 

example jquery:

<script>     $(document).ready(function(){         $('your_form_input_fields_id').val('');      }); </script> 

see link: reset webpage


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -