网站如何调用远程网页代码 就是本地网站调用远程 网站的的 一个文件的 代码内容 例如本地index.html 调用远程 footer.html 。。能够在 index.html 里面显示的。方法不限制用JS 也行 远程文件不规定规格.可以是txt 。xml 也可以是 html js 。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <iframe src="http://www.szbis.com" name="daoru" width="580" height="478" vspace="0" hspace="0" scrolling="yes" marginheight="0" marginwidth="0" frameborder="0"> </iframe>这样就把远程的页面嵌套到自己的页面了。希望是楼主想要的。 js不能跨域 试试:var js = document.createElement("script");js.type="text/javascript";js.src="路径";//对js这个对象进行数据处理操作......document.getElementByTagName("head")[0].appendChild(js);在后台设置代理试试 System.Net.IWebProxy 给忘了 google一下 void GetCode() { string url = "http://www.163.com"; Uri uri = new Uri(url); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); using (Stream resStream = response.GetResponseStream()) { using (StreamReader sr = new StreamReader(resStream, Encoding.GetEncoding("gb2312"))) { string result = sr.ReadToEnd(); Response.Write(result.Replace(">",">").Replace("<","<")); Response.End(); } } } 我自己解决了。用JS调用远程XML可以实现的。 打印入库单问题 sha-1算法的问题 请教:ocx调用javascript固有函数 用js改变多选框传递的参数的问题 怎么实现像快车或迅雷那样点击地址启动应用程序同时传参数。 关于QQ博客相册图片热区域问题 输入一个数字,选项表单增加至所输入数字个选项 xml+xslt+js打造带连线的树,期待你的关注 请问如何去除,文本框中的余留内容???93分 关于DHTML中给SELECT动态增加一个OPTION的问题 鼠标在网页边缘 网页内容自动翻页 网页源代码提取下载地址问题
hspace="0" scrolling="yes" marginheight="0" marginwidth="0" frameborder="0">
</iframe>这样就把远程的页面嵌套到自己的页面了。希望是楼主想要的。
var js = document.createElement("script");
js.type="text/javascript";
js.src="路径";
//对js这个对象进行数据处理操作......
document.getElementByTagName("head")[0].appendChild(js);在后台设置代理试试 System.Net.IWebProxy 给忘了 google一下
{
string url = "http://www.163.com";
Uri uri = new Uri(url);
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
using (Stream resStream = response.GetResponseStream())
{
using (StreamReader sr = new StreamReader(resStream, Encoding.GetEncoding("gb2312")))
{
string result = sr.ReadToEnd();
Response.Write(result.Replace(">",">").Replace("<","<"));
Response.End();
}
}
}