按键精灵在网页中怎么前台复制源文件中284行的内容?
2个回答
展开全部
//获取网页源码
VBSBegin
function getHTTPPage(Url)
dim Http
set Http=createobject("MSXML2.XMLHTTP")
Http.open "GET",Url,false
Http.send()
if Http.readystate <> 4 then
exit function
end if
getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
set http=nothing
if err.number <> 0 then err.Clear
end function
Function BytesToBstr(body,Cset)
dim objstream
set objstream = CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
VBSEnd
ss= GetHTTPPage("http://www.baidu.com")
MessageBox ss
VBSBegin
function getHTTPPage(Url)
dim Http
set Http=createobject("MSXML2.XMLHTTP")
Http.open "GET",Url,false
Http.send()
if Http.readystate <> 4 then
exit function
end if
getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
set http=nothing
if err.number <> 0 then err.Clear
end function
Function BytesToBstr(body,Cset)
dim objstream
set objstream = CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
VBSEnd
ss= GetHTTPPage("http://www.baidu.com")
MessageBox ss
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询