开发者

ajax partial load from another page

开发者 https://www.devze.com 2022-12-31 07:08 出处:网络
So what I want to do is load only a section of one webpage onto another page.So I want to grab the content of a page (stuff inbetween a div with a certain id) w开发者_JAVA技巧ithout the headers and fo

So what I want to do is load only a section of one webpage onto another page. So I want to grab the content of a page (stuff inbetween a div with a certain id) w开发者_JAVA技巧ithout the headers and footers. I know I've seen this before but its, stangly, a hard thing to find.

Anyone kind enough to point me in the right direction?

thank you


You can use the jquery's load method for that.

$('#result').load('test.html #container');

This will load contents of element having id container from test.html page into current page and inside the element with id result.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号