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

jquery method to control partial page refresh_jquery

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-16 15:53:141223browse

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
});

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

Statement:
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