This article mainly introduces the Ajax method to regularly update a certain piece of content on the page, involving related techniques of Ajax calling of the load method in jquery and setInterval timing execution. It has certain reference value. Friends who need it can refer to it
The example of this article describes the method of regularly updating a certain piece of content on the page using Ajax. Share it with everyone for your reference. The specific implementation method is as follows:
function updateShouts(){ // Assuming we have #shoutbox $('#shoutbox').load('latestShouts.php'); } setInterval( "updateShouts()", 10000 );
The above is what I compiled for everyone. I hope it will be helpful to everyone in the future.
Related articles:
Ajax method to obtain response content length
ajax method to traverse xml document
Simple implementation of Ajax displaying progress during the request process
The above is the detailed content of Ajax method to regularly update a certain piece of content on the page. For more information, please follow other related articles on the PHP Chinese website!