Home > Web Front-end > JS Tutorial > jquery method to control partial page refresh_jquery

jquery method to control partial page refresh_jquery

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 15:53:14
Original
1222 people have browsed it

The example in this article describes the method of jquery controlling partial refresh of the page. Share it with everyone for your reference. The specific analysis is as follows:

This code is very cleverly designed. It loads the content of the specified tag of the page through jQuery's load method

$('#button1').click(function() {
  var url = "http:www.your-url.com?ID=" + Math.random();
  //create random number
  setTimeout(function() {
  $("#elementName").load(url+" #elementName>*","");
  }, 1000); //wait one second to run function
});

Copy after login

I hope this article will be helpful to everyone’s jQuery programming.

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