开发者

How to get AJAX generated HTML text?

AJAX is a very powerful tool so I am struggling with it :-).

Is there any way or API(in java) so that I can get the HTML code which is generated by AJAX?

Generally, AJAX make use of inner HTML code and hence this inner HTML code is missing when I look into the page source of a page.

e.g click here

Just see the section OTHER NEWS. The content is popula开发者_Go百科ted by AJAX. When I look into the page source the code is not there.

I need this HTML code through a java program. How can I get it?


To have a Java application use the content received via AJAX, you need to first find the URLs from where the content is getting called from. In case this it would be http://itm2083.com/get_wwo_content.php?featureGroupId=8355&featureDisplayLimit=1&sponsorName=vortalx&wwoDivCounter=5&domainUrlForWWo=http://item2083.com/&featureImgDisplay=FLAG_TRUE&featureGroupImageWidthLimit=200&featureGroupDefaultImageUrl1=http://wwo.itmftp.com/75x75.gif&featureGroupDefaultImageUrl2=http://wwo.itmftp.com/75x75.gif&featureGroupDefaultImageUrl3=http://wwo.itmftp.com/75x75.gif

The featureGroupId= parameter has 5 IDs: 8355, 8359, 8367, 8369, 8429. Use these to pull the content from the Other News box.

The featureDisplayLimit= parameter determines how much content is pulled from the server.

If you want the nice HTML as well, the Java app will have to recreate it, as the HTML rendered on the site is created by JavaScript code.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜