The difference between Ajax and form form

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/tylt6688/article/details/102703119

1.ajax submitted, a request is received, are asynchronous, web pages do not need to refresh.

When the form is submitted is from a new page, even if it is submitted to the page itself, but also the need to refresh, that is, the form is synchronized.

This will cause the form to request a data page will jump once the current browser screen is refreshed, that is, will flash, can cause a bad user experience, but fill in the information which will be very easy to lose, while Ajax will not jump page, fill in the information before it will not disappear, no longer need to request a page.

2.ajax at the time of submission, is to create a request in the background.

from the trend to abandon the form on this page, apply again.

3.ajax must use js to achieve, not js-enabled browser to complete the operation.

from a browser function, regardless of whether or not to open js, you can submit the form.

4.ajax submitted, a request is received, the process procedures are required to process its data.

Time from submission, is based on the structure of your form auto-complete, no code intervention.

Guess you like

Origin blog.csdn.net/tylt6688/article/details/102703119