![](/img/trans.png)
[英]Is there a way to prevent ie7 from loading some inline javascript?
[英]Excel and IE7 - Prevent IE from opening Excel files
我有一個內部網頁面,用於超鏈接到文件服務器上的各種文件。
本地文件鏈接的問題是在Excel7而不是Excel中打開Microsoft Excel文件。
這導致Excel文件VBA代碼和其他功能正常工作。
有沒有辦法使用HTML / Javascript強制在Excel而不是IE7中打開文件?
它已經很久了,但我曾經做過類似的事情。 這顯然是服務器端代碼,我知道你指定了javascript / html。
Response.ContentType = "application/vnd.ms-excel";
Response.AppendHeader("content-disposition", "attachment;filename=test.xls");
編輯
這是一個不錯的例子,雖然有點舊http://aspalliance.com/259_Downloading_Files__Forcing_the_File_Download_Dialog
或者在PHP中你會這樣做:
//send headers that should force download
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename="downloaded.pdf"');
// and output the file:
readfile('file.xls');
好吧,如果你感覺有點頑皮: http : //support.microsoft.com/kb/162059
msgstr“”“要將Internet Explorer配置為在相應的Office程序中而不是在Internet Explorer中打開Office文件,請使用以下方法之一。”“”
它對你的控制系統沒有什么幫助...除非,當然你可以說服他們運行一些特權的ActiveX /腳本,.reg文件,或修改所述的設置( 我真的不推薦任何這些 )。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.