Ask a simple question about AJAX voting on a static page
Let me answer
Website Construction and Solution
I was familiar with AJAX and had a lot of questions.
The page is automatically generated once every 20 minutes. Assume that the number of votes a at the time is 100. After the time is 20 minutes, B has three votes, and the number of votes is changed to 103 when the number of static votes is generated again.
I want to know, suppose m1, m2, m3, three people open the browser and vote accordingly. After m1 opens the static page, the page is displayed as 100, and the result is no less than 101. after m2 opens the browser, will the number of votes displayed on the m2 static page be 100 or 101? In other words, when the server is not static again, the static page displayed by M2 is the number of votes at the time or the number of votes after the m1 vote.
If m2 sees 101 votes, how does it pass the value. Thank you!
Website Construction and Solution
If AJAX is used, you can also vote and return the total number of votes in the database.
Website Construction and Solution
Of course.
Website Construction and Solution
The static variable has been generated. How does the constant number of votes change as a variable?
Website Construction and Solution
Use js to send an asynchronous request to the background script. After processing, it returns relevant data and dynamically updates the div to be displayed in the callback function ~
Website Construction and Solution
With ajax, you can access your dynamic page with only one event and transmit the data. Acceptable data
Website Construction and Solution
I also want to know what I want to know ~~~~
Website Construction and Solution
OK. Thank you!