Suppose I have 2 html files: form.html and confirm.html
form.html just have a text field and a submit button, when you hit submit it will display what you just typed
You could also, instead of changing the page, change the content of the page. Upon submission just change the page using the innerHtml variable.