开发者

ajax partial load from another page

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜