如何获得AJAX生成的HTML文本? [英] How to get AJAX generated HTML text?

查看:83
本文介绍了如何获得AJAX生成的HTML文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

AJAX是一种非常强大的工具,所以我与它挣扎:-)。

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

有什么办法或API(Java)中,这样我可以得到它是由AJAX生成的HTML code?

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

通常情况下,AJAX利用内部HTML code,所以当我寻找到一个页面的页面源代码这一内部HTML code缺失。

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.

点击此处

刚刚看到的一节其他新闻。内容由AJAX填充。当我看着网页的源文件的code是不存在的。

Just see the section OTHER NEWS. The content is populated by AJAX. When I look into the page source the code is not there.

我需要通过一个Java程序,这个HTML code。我怎样才能得到它?

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

推荐答案

要拥有一个Java应用程序中使用通过AJAX接收到的内容,你需要先找到从其中内容被越来越从所谓的URL。在此情况下,这将是<一href="http://itm2083.com/get%5Fwwo%5Fcontent.php?featureGroupId=8355&featureDisplayLimit=1&sponsorName=vortalx&wwoDivCounter=5&domainUrlForWWo=http%3A//item2083.com/&featureImgDisplay=FLAG%5FTRUE&featureGroupImageWidthLimit=200&featureGroupDefaultImageUrl1=http%3A//wwo.itmftp.com/75x75.gif&featureGroupDefaultImageUrl2=http%3A//wwo.itmftp.com/75x75.gif&featureGroupDefaultImageUrl3=http%3A//wwo.itmftp.com/75x75.gif" rel="nofollow">http://itm2083.com/get%5Fwwo%5Fcontent.php?featureGroupId=8355&featureDisplayLimit=1&sponsorName=vortalx&wwoDivCounter=5&domainUrlForWWo=http%3A//item2083.com/&featureImgDisplay=FLAG%5FTRUE&featureGroupImageWidthLimit=200&featureGroupDefaultImageUrl1=http%3A//wwo.itmftp.com/75x75.gif&featureGroupDefaultImageUrl2=http%3A//wwo.itmftp.com/75x75.gif&featureGroupDefaultImageUrl3=http%3A//wwo.itmftp.com/75x75.gif

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%5Fwwo%5Fcontent.php?featureGroupId=8355&featureDisplayLimit=1&sponsorName=vortalx&wwoDivCounter=5&domainUrlForWWo=http%3A//item2083.com/&featureImgDisplay=FLAG%5FTRUE&featureGroupImageWidthLimit=200&featureGroupDefaultImageUrl1=http%3A//wwo.itmftp.com/75x75.gif&featureGroupDefaultImageUrl2=http%3A//wwo.itmftp.com/75x75.gif&featureGroupDefaultImageUrl3=http%3A//wwo.itmftp.com/75x75.gif

在featureGroupId =参数有5个编号:8355,8359,8367,8369,8429.使用这些拉从其他新闻中的含量

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

在featureDisplayLimit =参数决定了有多少内容从服务器上拉。

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

如果你想漂亮的HTML,以及,在Java应用程序将不得不重新创建它,因为在网站上呈现的HTML是通过JavaScript的code创建的。

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.

这篇关于如何获得AJAX生成的HTML文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆