Home > front end >  Jquery with the load () function, the realization of partial refresh, after loading a child page, CS
Jquery with the load () function, the realization of partial refresh, after loading a child page, CS

Time:09-29

Jquery with the load () function, the realization of partial refresh, after loading a child page, CSS styles of child pages failure, how to solve,?????

CodePudding user response:

Jquery's load () function is not like the iframe embedded in the parent page of an independent child pages,
But to read the source of the page, the page source code written to the father, the appearance of the page source code source code can be seen in the parent page,
So it may conflict with the original of the code from the parent page,

Generally use the load () function loads are used in the website all CSS style prior to load to the parent page, only need of child pages HTML fragments, even & lt; head> <body> Don't have labels,
In child pages written code, as a father fragment of the page, all of the relative address links are relative to the parent page,

CodePudding user response:

reference 1/f, the sky wave response:
jquery's load () function is not like the iframe in the parent page to embed an independent child pages,
But to read the source of the page, the page source code written to the father, the appearance of the page source code source code can be seen in the parent page,
So it may conflict with the original of the code from the parent page,

Generally use the load () function loads are used in the website all CSS style prior to load to the parent page, only need of child pages HTML fragments, even & lt; head> <body> Don't have labels,
When writing code of child pages, as a father fragment of the page, all of the relative address links are relative to the parent page,

Ok, thanks, I try
  •  Tags:  
  • Ajax