文章搜索: 分类 关键字

   您的位置:首页网络编程Cgi专区 → 使用脚本下载网页
使用脚本下载网页
日期:2006-3-12 3:41:17 人气:     [ ]
// 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
出处:CnCode转载收集 作者:不详
<---->
 
| 关于本站 | 帮助(?) | 广告服务 | 版权声明 | 业务合作 | 发展历程 | 加盟我们 | 联系我们 | 中国源码中心 ≮为您提供建站帮助≯

  中国源码中心 版权所有 Copyright© 2002-2006 Www.CnCode.Com, All Rights Reserved. Powered By 中国源码中心