本帖最后由 CrLf 于 2015-10-24 19:05 编辑
回复 3# 447219071
别截图,文字描述就好了,论坛空间宝贵,一张图顶一堆代码呢
试试这个,文字可以右键标记复制,或者自行重定向到文件再复制:- <!-- :
- @mshta "%~f0" | more & pause
- -->
- <script src="http://www.bathome.net/lib/diy/WSH.js"></script>
- <script>
- var host = 'http://batch-cn.qiniudn.com/'
-
- var ar = getText(host+'list/tool.txt')
-
- var ar = getText(host+'list/tool.@version.txt')
-
- function getText(strUrl){
- WSH.Echo('网址为'+strUrl+'?'+Math.random())
- try{
- var http = new ActiveXObject("Msxml2.ServerXMLHTTP")
- WSH.Echo('http:'+typeof http)
- http.open("GET",strUrl+'?'+Math.random(),false)
- http.send()
- WSH.Echo('status='+http.status)
- if(http.status>=400)return
- var stream = new ActiveXObject("ADODB.Stream")
- stream.Type = 1
- stream.Mode = 3
- stream.open()
- stream.write(http.responseBody)
- WSH.Echo('Size='+stream.Size)
- stream.Position = 0
- stream.Type = 2
- stream.CharSet = 'gb2312'
- return stream.ReadText
- }
- catch(Err){WSH.Echo(Err.message)}
- }
- close()
- </script>
复制代码
|