JavaScript display new page when submit HTML form

前端 未结 4 1772
庸人自扰
庸人自扰 2021-01-07 14:02

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

4条回答
  •  天涯浪人
    2021-01-07 14:50

    You could also, instead of changing the page, change the content of the page. Upon submission just change the page using the innerHtml variable.

提交回复
热议问题