用ASP实现的:
http://rtfm.atrax.co.uk/infinitemonkeys/articles/asp/934.asp
改客户端配置实现的:
You can't force a behaviour from a link using client-side JavaScript.
The only ways to prevent IE from actually loading the Word document via
OLE if Word is installed are:
1) visit every single machine you want to prevent the behaviour on and
break the MIME type connection on that copy of Windows
2) use some sort of server-side technology to send the following headers:
Content-Disposition: attachment; filename="thefile.doc"
Content-type: application/msword
then read and write the contents of the file to the browser.
http://rtfm.atrax.co.uk/infinitemonkeys/articles/asp/934.asp
改客户端配置实现的:
You can't force a behaviour from a link using client-side JavaScript.
The only ways to prevent IE from actually loading the Word document via
OLE if Word is installed are:
1) visit every single machine you want to prevent the behaviour on and
break the MIME type connection on that copy of Windows
2) use some sort of server-side technology to send the following headers:
Content-Disposition: attachment; filename="thefile.doc"
Content-type: application/msword
then read and write the contents of the file to the browser.