What is the mechanism that causes the page to refresh when data is submitted to the server?

自闭症网瘾萝莉.ら 提交于 2019-12-13 03:46:50

问题


Why exactly does the page refresh when data is sent from a form element to the server? For data that is sent by POST for example, does what the server receives depend on how it was sent? i.e. by simple form submit, DOM submit, ajax submit, etc. Is it the server response that triggers the refresh? Is there any way to change the response that is sent so that it doesn't trigger a refresh? Or prevent a response from being sent at all? P.S. I am aware that there are a gazillion different ways that purport to send form data without a page refresh. What I am looking for is some understanding of what is going on by answers to the simple questions I have asked.

来源:https://stackoverflow.com/questions/57956498/what-is-the-mechanism-that-causes-the-page-to-refresh-when-data-is-submitted-to

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!