<input type=button value=另存为   onclick="document.execCommand('Saveas',false,'c:\\test.htm')">

解决方案 »

  1.   

    <a href="#" onclick="document.execCommand('Saveas',false,'c:\\test.htm')">abc</a>
      

  2.   

    <script language=javascript>
     function save(str)
     
      {
        try
        {
         this.document.execCommand("SaveAs", true, "请输入文件名");;
        }
        catch(e)
        {
          alert("您的浏览器版本太低,请升级您的浏览器!");
        }
      }
    </script>