高分求助:怎么通过单击链接在IE里显示word文档啊 weblogic的 mime mapping 没有设置吧 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不应该吧,你换一台机器试试?我觉得不是weblogic问题,是你的IE设置有问题. 是中文的问题吧.中文文档需要URLEncoder.encode("数字金刚")转换一下 怎么转换啊,在哪里转换,我试了不管用啊我在有word文档链接的a.jsp页面里加了这个语句:response.setHeader("Content-disposition","attachment;filename="+tzxx.getAppendname());response.setContentType("application/x-word");这个a.jsp里有一个链接如下:http://localhost:7001/wsjdzf/upload/zz.doc还是没起作用,而且更糟糕的是,其他页面有a.jsp的链接的地方,都出现提示问是否下载a.jsp <object id=FileDialog style="left: 0px; TOP: 0px" classid="clsid:f9043c85-f6f2-101a-a3c9-08002b2f49fb" codebase="http://activex.microsoft.com/controls/vb5/comdlg32.cab"></object><input type=button value="打开Word文档" onclick='OpenFile()'><input type=button value="HTML格式" onclick='window.confirm(App.innerHTML)'><div align=left id=App style="border:1 solid #000000;background-color:#FFFFFF;height:400px;overflow:auto;width:100%;z-index:2" contentEditable></div><script>function OpenFile(){ try { FileDialog.CancelError=true; FileDialog.Filter="Word模板|*.doc|Word模板|*.dot"; FileDialog.ShowOpen(); var WordApp=new ActiveXObject("Word.Application"); WordApp.Application.Visible=false; var Doc=WordApp.Documents.Open(FileDialog.filename); Doc.Activate(); Doc.Parent.Options.InsertedTextColor=4; Doc.Parent.Options.InsertedTextMark=2; Doc.Parent.Options.DeletedTextColor=4; Doc.Parent.Options.DeletedTextMark=1; Doc.TrackRevisions=true; Doc.PrintRevisions=true; Doc.ShowRevisions=true; Doc.Application.UserName=""; var Range=Doc.Range(); Range.Select(); var Selection=WordApp.Selection; Selection.Copy(); App.focus(); document.execCommand("Paste"); App.focus(); WordApp.DisplayAlerts=false; Doc.Close(); WordApp.DisplayAlerts=true; WordApp.Quit(); } catch(e){} return false;}</script> jsp 如何获取表格某一行中的数据 jsp wap 开发中乱码问题 如何实现带条件的分页? 怎样拿到HTML中提交的数据 求jsp一个完整页面的小程序 求JBoss+Apache的整合方法 <jsp:useBean id="a" class="com.FormBean" scope="request"> 与 servlet 帮忙看看~~ SmartUpload的问题,快帮忙 JSP中email格式的判断 如何取出表中记录的总个数 (在线等) 取随机数?
中文文档需要URLEncoder.encode("数字金刚")转换一下
我在有word文档链接的a.jsp页面里加了这个语句:
response.setHeader("Content-disposition","attachment;filename="+tzxx.getAppendname());
response.setContentType("application/x-word");这个a.jsp里有一个链接如下:http://localhost:7001/wsjdzf/upload/zz.doc还是没起作用,而且更糟糕的是,其他页面有a.jsp的链接的地方,都出现提示问是否下载a.jsp
</object>
<input type=button value="打开Word文档" onclick='OpenFile()'>
<input type=button value="HTML格式" onclick='window.confirm(App.innerHTML)'>
<div align=left id=App style="border:1 solid #000000;background-color:#FFFFFF;height:400px;overflow:auto;width:100%;z-index:2" contentEditable></div>
<script>
function OpenFile()
{
try
{
FileDialog.CancelError=true;
FileDialog.Filter="Word模板|*.doc|Word模板|*.dot";
FileDialog.ShowOpen();
var WordApp=new ActiveXObject("Word.Application");
WordApp.Application.Visible=false;
var Doc=WordApp.Documents.Open(FileDialog.filename);
Doc.Activate();
Doc.Parent.Options.InsertedTextColor=4;
Doc.Parent.Options.InsertedTextMark=2;
Doc.Parent.Options.DeletedTextColor=4;
Doc.Parent.Options.DeletedTextMark=1;
Doc.TrackRevisions=true;
Doc.PrintRevisions=true;
Doc.ShowRevisions=true;
Doc.Application.UserName="";
var Range=Doc.Range();
Range.Select();
var Selection=WordApp.Selection;
Selection.Copy();
App.focus();
document.execCommand("Paste");
App.focus();
WordApp.DisplayAlerts=false;
Doc.Close();
WordApp.DisplayAlerts=true;
WordApp.Quit();
}
catch(e){}
return false;
}
</script>