想把这个网页http://news.sina.com.cn/hotnews/ 源码
直接利用脚本保存成c:\abc.txt
非常感谢

解决方案 »

  1.   

    以前一个哥们写了这个,但我用不行说第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;//*************************************** 
      

  2.   

    是这句错误吧兼容性问题
    var xmlhttp = new ActiveXObject( "Microsoft.XMLHTTP ");