参考
http://msdn.microsoft.com/workshop/author/persistence/overview.asp

解决方案 »

  1.   

    看看这个办法也许行的通吧??(纯属猜测----根据孟子老大以前给的代码)
    ///////////////////////////////////////////////////////////
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html>
    <head>
    <title>Untitled</title>
    <Script language="javascript">
    <!--
    function fncSource()
    {
    document.write(document.documentElement.outerHTML);
    }
    //-->
    </Script>
    </head>
    <body>
    <input type="button" name="save" value='save' onclick="document.execCommand('Saveas',false,'c:\\test.html')">
    <input type="text" name="txt" value='' onBlur="fncSource()">
    </body>
    </html>
      

  2.   

    小弟学艺不精,上边的程序,有严重的bug,再发一次!这个是我左拼右凑的,希望好使:
    //////////////////////////////////////////////////////////////////////
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html>
    <head>
    <title>Untitled</title>
    <Script language="javascript">
    <!--
    function fncSource()
    {
    if (document.all.hdn.value==1)
    {
    document.write(document.documentElement.outerHTML);
    }
    document.execCommand('Saveas',true,'c:\\test.htm');
    document.all.hdn.value="2";
    }
    //-->
    </Script>
    </head>
    <body>
    <input type="button" name="save" value='save' onclick="fncSource()">
    <input type="text" name="txt" value=''>
    <input type="hidden" name="hdn" value=''>
    </body>
    </html>
      

  3.   

    换这个方法就可以了
    <html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <title>New Page 1</title>
    <script>
    function savefile(){   //保存文件函数
    var contentstr=document.documentElement.outerHTML
    savepage.document.clear();
    savepage.document.open();
    savepage.document.write(contentstr);
    savepage.document.execCommand('SaveAs',false,"a.htm");
    savepage.document.clear();
    savepage.document.close()
    }
    </script></head><body><form method="POST" action="--WEBBOT-SELF--">
      <!--webbot bot="SaveResults" U-File="fpweb:///_private/form_results.txt"
      S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
      <p><input type="text" name="T1" size="20"><input type="button" value="保存当前页面" name="B1" onclick="savefile();"><input type="reset" value="全部重写" name="B2"></p>
    </form>
    <iframe id=savepage src="about:blank" style="display:none"></iframe>  <!--实现保存-->
    </body></html>
      

  4.   

    还是有漏掉的:
    <input type="hidden" name="hdn" value=''>
    改成:
    <input type="hidden" name="hdn" value="1">