the browser doesn't allow you to do that, of course, you can always write your own or customize the browserthat is why I suggest you get the 跨域网页 on the server side, parse the content and get the 链接s
Function GetUrl(Url) set oSend=createobject("Microsoft.XMLHTTP") SourceCode = oSend.open ("GET",url,false) oSend.send() SourceCode = bytes2BSTR(oSend.responseBody) GetUrl = SourceCode End Function <SCRIPT LANGUAGE="VBScript"> Function bytes2BSTR(vIn) strReturn = "" For j = 1 To LenB(vIn) ThisCharCode = AscB(MidB(vIn,j,1)) If ThisCharCode < &H80 Then strReturn = strReturn & Chr(ThisCharCode) Else NextCharCode = AscB(MidB(vIn,j+1,1)) strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode)) j = j + 1 End If Next bytes2BSTR = strReturn End Function 通过GetUrl(网址)获得该页面的源代码后,自己再写程序提取网页的链接
如果链接不含中文字符,可改为 Function GetUrl(Url) set oSend=createobject("Microsoft.XMLHTTP") SourceCode = oSend.open ("GET",url,false) oSend.send() SourceCode = oSend.responseText GetUrl = SourceCode End Function 速度会更快
http://expert.csdn.net/Expert/topicview.asp?id=1419092如果在本地运行,通过hta也可。否则……自己去写浏览器吧
set oSend=createobject("Microsoft.XMLHTTP")
SourceCode = oSend.open ("GET",url,false)
oSend.send()
SourceCode = bytes2BSTR(oSend.responseBody)
GetUrl = SourceCode
End Function
<SCRIPT LANGUAGE="VBScript">
Function bytes2BSTR(vIn)
strReturn = ""
For j = 1 To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,j,1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,j+1,1))
strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
j = j + 1
End If
Next
bytes2BSTR = strReturn
End Function 通过GetUrl(网址)获得该页面的源代码后,自己再写程序提取网页的链接
Function GetUrl(Url)
set oSend=createobject("Microsoft.XMLHTTP")
SourceCode = oSend.open ("GET",url,false)
oSend.send()
SourceCode = oSend.responseText
GetUrl = SourceCode
End Function
速度会更快