当前位置:系统之家 > 技术开发教程 > 详细页面

使用脚本下载页面

使用脚本下载页面

更新时间:2022-09-29 文章作者:未知 信息来源:网络 阅读次数:

// 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 

温馨提示:喜欢本站的话,请收藏一下本站!

本类教程下载

系统下载排行