Home > Web Front-end > JS Tutorial > 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
Release: 2016-05-16 17:02:53
Original
1226 people have browsed it

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
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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template