设为首页
加入收藏
站内地图
旧版入口

使用脚本下载网页

作者:佚名 出处:网络转载 时间:09-07 点击:

内容载入中...
// The URL to download 
var url = "http://www.aboutnt.com/default.htm" 
// Create instance of Inet Control 
inet = new ActiveXObject("InetCtls.Inet"); 
// Set the timeout property 
inet.RequestTimeOut = 20; 
// Set the URL property of the control 
inet.Url = url; 
// Actually download the file 
var s = inet.OpenURL(); 
// Show the raw HTML to the user 
WScript.Echo( s ); 
// Bonus - Find the title of the page 
// Regular expression to find the string stored between 
// the title tags. 
rtitle = /<title>(.*)<\/title>/i; 
// Execute the regular expression on the raw HTML 
var title = rtitle.exec( s ); 
// Display the result 
收藏本文:
】【打印页面】【推荐给朋友】【关闭窗口

站长学院

推荐信息