Home > Article > Web Front-end > How to write ajax in js
Using ajax in JavaScript has two functions:
1. Let js read the data on the server.
2. No refresh Under certain circumstances, read the data on the server, for example: verify whether the account and password are correct, etc.
We know that there are two types of network requests: Get and Post. What is the difference between them?
Get method: Common form submission method: submit the value after the url;?name=value&name=value format.
Submit form example: