站长论坛 站长下载 站长工具 小说阅读 域名主机 模版下载

使用脚本下载网页

[ 来源:互联网 | 作者:站长胡同站整理 |  时间:2007-09-06 09:24:58 | 浏览:175次 ]
// 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 

责编:天羽

发表评论

  称  呼:
  内  容:
 

最新教程

热门教程

推荐广告

本站推荐