2

假设有一个网站,比如foo-example.com
我想获取index首页的整个 HTML 源代码(http://foo-example.com/index.html

index.html 的代码是这样的:

HTML 源代码 ( http://foo-example.com/index.html )

<html>
    <title>Hello, world</title>
    <head>
    </head>
    <body>
        <embed type="application" id="records" link="xxxxxxxxxxxxxxxx">
    </body>
</html>

如何获取整个 HTML 源代码,并解析由链接包装的字符串?然后我想alert(strings);最后弹出这样的警报。

4

0 回答 0