<% @Language="JavaScript" %>
<%
function GetSource(url)
{
var oXmlHttp = Server.CreateObject("Microsoft.XMLHTTP");
oXmlHttp.open("GET",url, false);
oXmlHttp.send()
var oStream = Server.CreateObject("ADODB.Stream");
if(oStream == null)
Response.Write("您的机器不支持ADODB.Stream.")
else
{
oStream.Type=1;
oStream.Mode=3;
oStream.Open() ;
oStream.Write(oXmlHttp.responseBody);
oStream.Position= 0;
oStream.Type= 2;
oStream.Charset="gb2312";
var result= oStream.ReadText();
oStream.Close();
oStream = null;
return result;
}
}
Response.Write(GetSource("http://61.156.42.106/test/qixiang.php"))
%>
<%
function GetSource(url)
{
var oXmlHttp = Server.CreateObject("Microsoft.XMLHTTP");
oXmlHttp.open("GET",url, false);
oXmlHttp.send()
var oStream = Server.CreateObject("ADODB.Stream");
if(oStream == null)
Response.Write("您的机器不支持ADODB.Stream.")
else
{
oStream.Type=1;
oStream.Mode=3;
oStream.Open() ;
oStream.Write(oXmlHttp.responseBody);
oStream.Position= 0;
oStream.Type= 2;
oStream.Charset="gb2312";
var result= oStream.ReadText();
oStream.Close();
oStream = null;
return result;
}
}
Response.Write(GetSource("http://61.156.42.106/test/qixiang.php"))
%>
解决方案 »
- 请高手帮个忙,一个关于JS获取元素坐标的问题
- 用showModelDialog的弹出的窗口不能是.jsp的吗?
- 一个关于js的问题,期待答案中
- SINA的“与同时访问此页面的网友聊天”程序是怎么做得?有没相似的程序,谢谢
- jsp 如何自己加载时顺序执行一个函数,而不用点击。我是学asp的菜鸟所以请人指教!
- window.alert('ok')弹出对话框 后 确定 按钮的click 跳转到另外一个画面,怎么写?
- 如何实现点链接选中复选框中对应的一项!
- window.open打开的窗体的一个问题
- window.document.body.innerHTML报错:Cannot read property 'body' of undefined
- js实现两个下拉联动
- 屏蔽CTRL+N的问题
- 请教框架问题
{
var xml = new ActiveXObject("Microsoft.XMLHTTP");
xml.open("GET", "http://61.156.42.106/test/qixiang.php", false);
xml.send();
alert(xml.responseText);//自己处理显示吧
}
function baoGetHTML(url)
{
var oHttp = new ActiveXObject("Microsoft.XMLHTTP");
oHttp.open("GET", url, false);
oHttp.send();
SourceCode = bytes2BSTR(oHttp.responseBody);
document.write(SourceCode);
//bytes2BSTR(oHttp.responseBody)这就是网页的代码.
}
</script><script language="vbscript">
Function bytes2BSTR(vIn)
Dim strReturn,i,ThisCharCode,innerCode,Hight8,Low8,NextCharCode
strReturn = ""
For i = 1 To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,i,1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,i+1,1))
strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
i = i + 1
End If
Next
bytes2BSTR = strReturn
End Function
</script>
<body onload="baoGetHTML('http://61.156.42.106/test/qixiang.php')">
function baoGetHTML(url)
{
try{
var oHttp = new ActiveXObject("Microsoft.XMLHTTP");
oHttp.open("GET", url, false);
oHttp.send();
SourceCode = bytes2BSTR(oHttp.responseBody);
document.write(SourceCode);
//bytes2BSTR(oHttp.responseBody)这就是网页的代码.
}catch(e){
alert("不支持该组件");
//.....
}
}
</script>
我是在本机开发时get服务器上的网站没问题。
可是上传到服务器上就不行了。
说没有权限。