pop=window.open('test.htm','','top=10000')
pop.document.execCommand('Saveas');
pop.close();
//---------------------------------------------------
不知道是不是这个意思。总之保存网页可以用execCommand方法,第一个参数设为Saveas。

解决方案 »

  1.   

    我的意思是要保存网页html语句中的<a href="javascript:opennew('test.htm')">测试</a> 的超链结test.htm文件! thank you!!!
      

  2.   

    但是opennew()应该是一个自定义的函数吧?我怎么知道那是什么函数?你把opennew()也帖出来啊。
      

  3.   

    或许你没有弄清楚,那个链接实际上是运行了一段js。而那里面的opennew()应该是一个自定义的函数。
      

  4.   

    函数opennew(url)如下:
    <script language="javascript">
    function opennew(url){
    <!--
    var gt = unescape('%3e');
    var popup = null;
    var over = "Launch Pop-up Navigator";
    popup = window.open('  ', '', ',width=600,height=400,resizable=1,scrollbars=yes');popup.location.href='answer/' + url;
    // -->
    }
    </script>
      

  5.   

    1.
    <script>window.open("view-source:http://www.csdn.net/")</script>2.
    http://www.csdn.net/Develop/read_article.asp?id=14994
      

  6.   

    3.
    <script>
    var win=window.open("test.html");
    setTimeout("win.document.execCommand('Saveas')",1000)
    </script>4.xmlHttp
    5.#default#download