Home  >  Article  >  Web Front-end  >  Use Jquery.load to load the page to achieve partial refresh_jquery

Use Jquery.load to load the page to achieve partial refresh_jquery

WBOY
WBOYOriginal
2016-05-16 17:02:531195browse

Because I didn’t understand Jquery at first, I always wanted to use the jquery.load method to load a new page to achieve partial refresh. It turned out that the loaded page was different from the original separate page, and the style was gone. Later I checked it online. , I found a solution, this is someone else’s answer:

is like this, if you don’t filter out some content and load it directly, the page will be confused. For example, the new page also has the tag. , after loading, a page will have two HTML tags with non-standard . This is specified in the jquery.load() function. Generally, the loaded page needs to redefine the CSS style and add js events according to the elements of the loaded content. For example:
Original page A.html:

Copy code The code is as follows:

< ;html>




The loaded page B.html:





  1. 234123
  2. 341234
  3. 41234
  4. 412de34




Load the called jquery.load( in the original page A.html ), and then redefine the style of page-li on the original page:
Added load(), the original page of css:




< div id="container">



Hope it helps you
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
Previous article:html dom node operation (get/modify/add or delete)_javascript skillsNext article:html dom node operation (get/modify/add or delete)_javascript skills

Related articles

See more