Weak weak Q: Is it common for everyone to transfer data? For example, you need to query the database to read the data source. after sorting out the data, you need to use js rendering to make a chart. My idea is: The index page is a php, and the user clicks an item of interest and updates the index page. But how can I update the page? Weak question: Is it common for everyone to transfer data?
For example, you need to query the database to read the data source, and then use js rendering to make a chart.
My idea is:
The index page is a php. You can click an item you are interested in and then update the index page. But how is it reasonable to update the page? To update a chart, you need to query the database. Does a user click an entry to use js response or use the GET parameter to refresh the current page?
The other is the choice of js. I am the five dregs of war. I will only use some simple jQuery. What is the basic control of pure js writing pages is an idiot. Some other rendering libraries do not rely on jQuery. I also want to make the page lighter. Should I consider learning pure js or continuing to load jQuery?
Reply content:
Weak weak Q: Is it common for everyone to transfer data?
For example, you need to query the database to read the data source, and then use js rendering to make a chart.
My idea is:
The index page is a php. You can click an item you are interested in and then update the index page. But how is it reasonable to update the page? To update a chart, you need to query the database. Does a user click an entry to use js response or use the GET parameter to refresh the current page?
The other is the choice of js. I am the five dregs of war. I will only use some simple jQuery. What is the basic control of pure js writing pages is an idiot. Some other rendering libraries do not rely on jQuery. I also want to make the page lighter. Should I consider learning pure js or continuing to load jQuery?
- We recommend that you click to update data.
AJAXQuery in the background. The icon page requires a high level of experience. Similarly, the data on the first page should also beAJAXSo that the user can seePlottingThe animation process is very dazzling.
- Why not
jQueryJQuery has improved many js features, making js as easy to use and powerful as PHP. A compressed jQuery Library only hasDozens of K, The user casually a picture200K, There is no need to save this little volume.
You can check the restapi. The query is a get request. After AJAX requests, the data is directly rendered on the page.
The Standard Guide for building APIs using JSON has not been translated yet. I hope it will help you.
Php can handle json data, js reception, ajax, and page Jump. For charts, you can use some chart libraries, svg's raphael and d3. jquery. Many good features, such as ajax, page display, no need to worry about yourself