Home > Article > Web Front-end > A simple example of partial refresh using JQuery's Ajax request_jquery
The parameters (data) passed by the ajax path of the request will be received by a variable with the same name (with set get method) in the action. The returned data is a JQuery array object, which is involved in the called action. Data variables and objects will be encapsulated into data and finally returned to the page.
Case: As shown in the figure
I want to change the status. After changing the icon using JQuery's Ajax, the icon changes. Partial refresh of the page
Principle: Partial refresh is part of refreshing the page. In this case, it is only the change of the icon. It separates the background code from the real icon of the front desk, and does not change the database. Re-do the query. Second, after the background digital display data is modified, the front-end directly changes the icon.
1. The page gives the icon of each record a unique id value: