以前一个哥们写了这个,但我用不行说第8行什么变量错误 write a wsh script to retrieve the page and save it, use AT command or the Task Scheduler to schedule the script to run periodically, for example, save the following into a file named "GetPage.js "://GetPage.js //*************************************** var sURL = "http://www.csdn.net "; var sFilePath = "c:\\csdn.html ";var adSaveCreateOverWrite = 2; var adTypeBinary = 1; var xmlhttp = new ActiveXObject( "Microsoft.XMLHTTP "); xmlhttp.open( "GET ",sURL,false); xmlhttp.send();var stream = new ActiveXObject( "ADODB.Stream "); stream.type = adTypeBinary; stream.open(); stream.write(xmlhttp.responseBody); stream.saveToFile(sFilePath,adSaveCreateOverWrite);stream = null; xmlhttp = null;//***************************************
是这句错误吧兼容性问题 var xmlhttp = new ActiveXObject( "Microsoft.XMLHTTP ");
write a wsh script to retrieve the page and save it, use AT command or the Task Scheduler to schedule the script to run periodically, for example, save the following into a file named "GetPage.js "://GetPage.js
//***************************************
var sURL = "http://www.csdn.net ";
var sFilePath = "c:\\csdn.html ";var adSaveCreateOverWrite = 2;
var adTypeBinary = 1;
var xmlhttp = new ActiveXObject( "Microsoft.XMLHTTP ");
xmlhttp.open( "GET ",sURL,false);
xmlhttp.send();var stream = new ActiveXObject( "ADODB.Stream ");
stream.type = adTypeBinary;
stream.open();
stream.write(xmlhttp.responseBody);
stream.saveToFile(sFilePath,adSaveCreateOverWrite);stream = null;
xmlhttp = null;//***************************************
var xmlhttp = new ActiveXObject( "Microsoft.XMLHTTP ");