Ajax obtains the background data. Is this data written in the database? Ajax obtains the background data. Is this data written in the database?
Reply content:
Ajax obtains the background data. Is this data written in the database?
Answer the question first, either yes or no.
Then explain why ajax sends an xhr package to the backend, and performs a series of operations after backend parsing (adding, deleting, querying, and modifying data ). For example, if you register a user, submit the registration data using ajax, and then send the data to the backend for processing, that is, insert the data to the database. Then, a result is returned. The ajax callback function performs subsequent operations on the client based on the returned results.
This data is composedThe background generates. It can be native database content, processed content, or something else.
Databases, files, sessions, and custom data can also be used.
Obtain data from php, java, python, and nodejs
Convert to json, xml
Ajax Recognition
In fact, the interaction between the background and the foreground is implemented through interfaces, or APIs.
The specific embodiment is the json, xml, and other exchange formats.
This is like two people, one from China and one from Japan. You don't know Japanese, and I don't know Chinese.
But everyone knows English, so they translate it into English first.
How did this English come from? You can translate sentences in the book you are looking for or think about yourself.
There are many methods.