Home > Web Front-end > JS Tutorial > Ajax method to regularly update a certain piece of content on the page

Ajax method to regularly update a certain piece of content on the page

亚连
Release: 2018-05-25 10:38:54
Original
1729 people have browsed it

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 );
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template