哪得用专门的支持Javascript的服务器

解决方案 »

  1.   

    难,至于支持Javascript的服务器,随便找一个就支持.
      

  2.   

    采用XMLHTTP+ADO.Stream就可以了
    http://www.china-pub.com/computers/emook/wzq/044/info.htm
      

  3.   

    <script language="javascript">
    function URLDownloadToFile(sURL, sFilePath)
    {
      var adTypeBinary  = 1;
      var adSaveCreateOverWrite = 2;  var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      xmlhttp.open("GET",sURL,false);
      xmlhttp.send();
      if (xmlhttp.status != 200)
      {
               alert("something is wrong:" + xmlhttp.statusText);
      }
      else
      {
        var stream = new ActiveXObject("ADODB.Stream");
        stream.type = adTypeBinary;
        stream.open();
        stream.write(xmlhttp.responseBody);
        stream.saveToFile(sFilePath, adSaveCreateOverWrite);
        stream.close();
        stream = null;
      }  xmlhttp = null;
    }function window.onload()
    {
      //you should set the url to your web server onlyURLDownloadToFile("http://localhost/test/xml-wellformed.zip","c:/temp/ml-wellformed.zip");
    }
    </script>