网页能读取这个列表吗: http://batch-cn.qiniudn.com/list/tool.txt
可以的话试一下运行下面这个返回的数字是多少:- <!-- :
- @mshta "%~f0"
- -->
- <script>
- var host = 'http://batch-cn.qiniudn.com/'
- var ar = getText(host+'list/tool.txt').split(/\r?\n/)
- alert(ar.length)
- function getText(strUrl){
- var http = new ActiveXObject("Msxml2.ServerXMLHTTP")
- http.open("GET",strUrl+'?'+Math.random(),false)
- http.send()
- if(http.status>=400)return
- var stream = new ActiveXObject("ADODB.Stream")
- stream.Type = 1
- stream.Mode = 3
- stream.open()
- stream.write(http.responseBody)
- stream.Position = 0
- stream.Type = 2
- stream.CharSet = 'gb2312'
- return stream.ReadText
- }
- close()
- </script>
复制代码
|