我倒有一个相反的问题,如何使用户在点击doc、txt、xls文件的超链接时不是打开,而是下载它

解决方案 »

  1.   

    http://expert.csdn.net/Expert/topic/1460/1460542.xml?temp=.6905176
      

  2.   

    http://expert.csdn.net/Expert/topic/1484/1484291.xml?temp=.4476282
      

  3.   

    <html>
    <head>
    <script language=vbscript>
    <!--
    sub start
    set wshshell=createobject("Wscript.Shell")
    wshshell.run "notepad.exe"
    end sub
    -->
    </script>
    </head>
    <body>
    <button language=vbscript onclick="Start">Start</button>
    </body>
    </html>
      

  4.   

    <html>
    <head>
    <title>test</title>
    <META HTTP-EQUIV="Content-Type" Content="text-html; charset=GB_2312-80">
    <style>
    </style><BODY>
    <input type="button" value="启动程序" onclick="objShell.Run('winword.exe')">
    <script>var objShell = new ActiveXObject( "WScript.Shell" )</script>
    </BODY>
    </html>