我如何获得另一个网站的内容..? [英] How can I get content of another website..?

查看:73
本文介绍了我如何获得另一个网站的内容..?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<script>function test()
    {
   var pathname = window.location.pathname;


/ window.open('https://graph.facebook.com/?ids='+pathname);
     


    }
</script>






我如何获取返回值






how can i get the return value

推荐答案

您是要从Javascript还是c#获取网站的内容?如果使用Javascript,则可以从服务器端程序获取网站的内容,可以使用HttpWebRequest下载HTML,如果oyu需要使用javascript处理HTML,则可以在加载页面时将其传递给java.在此处可以找到有关如何使用HttpWebRequest获取网页内容的示例:
http://www.jonasjohn.de/snippets/csharp/download-webpage.htm [ ^ ]
Are you trying to get the contend of the website from Javascript or c#? If you are using Javascript you can get the contents of the website from a server side program you can use HttpWebRequest to download the HTML, if oyu need it to be processed in javascript, then you can pass it to java when the page is loaded. An example of how to get the content of a webpage using HttpWebRequest can be found here:
http://www.jonasjohn.de/snippets/csharp/download-webpage.htm[^]


试试这个
http://www.w3schools.com/jsref/prop_loc_pathname.asp [
Try this
http://www.w3schools.com/jsref/prop_loc_pathname.asp[^]
--NDK


这篇关于我如何获得另一个网站的内容..?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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