Examples of Ajax asynchronous form data submission instructions and methods. For details, refer to the scenario description:
There is a logon form on a logon page, but the login verification logic is complicated. We hope that the current page will not be refreshed after clicking logon, after the logon result is displayed, select whether to jump to the new page or prompt that the user name and password are incorrect. There are many problems like this. Asynchronous Data Acquisition greatly enhances user experience.
Background:
Ajax refers to Asynchronous JavaScript And XML (Asynchronous JavaScript And XML ).
AJAX is not a new programming language, but a method for creating better, faster, and more interactive
Web application technology. Through AJAX, your JavaScript can use the XMLHttpRequest object of JavaScript to directly communicate with the server. With this object, your JavaScript can exchange data with the Web server without reloading the page. AJAX
Use asynchronous data transmission (HTTP request) between the browser and the Web server so that the webpage can request a small amount of information from the server, rather than the whole page. AJAX can make Internet applications smaller, faster, and more friendly. AJAX
It is a browser technology independent of Web server software. AJAX is based on the following Web standards: the Web standards used by JavaScript xml html css in AJAX have been well defined and supported by all mainstream browsers. AJAX applications are independent of browsers and platforms. Web
Applications have many advantages over desktop applications. They can involve a wide range of users, which are easier to install, maintain, and develop. However, Internet applications are not as comprehensive and user-friendly as traditional desktop applications.
Through AJAX, Internet applications can be improved and more friendly.
Usage:
The Code is as follows: