<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="Author" content="cuixiao">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>-</title>
<link href="../CommonComponent/Style/Style1.css" rel="stylesheet" type="text/css">
<script src="../CommonTheme/Javascript/display.js"></script>
</head>
<body class="pad1">
<input type="button" onclick="document.styleSheets[0].href=''document.execCommand('saveas',false,'c:\aaa.htm');" value="另存为">
</body>
</html>

解决方案 »

  1.   

    js是无法实现的,因为保存/另存为是从服务器上下载文件,而js只是修改客户端的显示
      

  2.   

    vivianfdlpw() :
    如果打开一个页面后把网线拔了,再去保存该网页仍然保存成功。
      

  3.   

    不好意思,说错了
    IE保存文件大部分是从Internet临时文件夹中获取的
    如果清除临时文件夹中的文件,然后执行文件另存为
    文件还是可以保存,但是里边只是仅有的几行信息,没有实质性的内容
      

  4.   

    那你就把报表全部数据库加载到客户端..用Javascript显示..将报表数据赋值给一个变量..然后保存这个变量...
      

  5.   

    <html>
    <head>
    <title></title>
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function saveAs(){
    // var winSave = window.open('','','top=5000,left=5000');
    var winSave = window.open();
    winSave.document.open ("text/html","gb2312");
    winSave.document.write (document.body.outerHTML);
    winSave.document.execCommand ("SaveAs",true,"aaa.htm");
    winSave.close();
    }
    //-->
    </SCRIPT>
    </head>
    <body><A HREF="http://www.csdn.net" id="a1">csdn</A>
    <input type="button" value="另存为" onclick="saveAs()">
    <input type="button" value="替换连接" onclick="javascript:a1.href='#'">
    </body>
    </html>
      

  6.   

    THANKS awaysrain(绝对零度)(既然选择了远方就要日夜前行)