//word 下载防止IE阻止
document.getElementsByName('b_download')[0].onclick = function(){
window.location = 'printStudentTrainPlanAction.do?studentID=<bean:write name="studentDTO" property="st
udentID"/>';
}
word 下载
<%@ page contentType="application/msword;charset=GBK" %>
下载改下载文件名称
<%
response.setContentType("application/doc");
response.setHeader("Content-Disposition", "inline; filename=\".doc\"");
<%
//
response.setContentType("application/doc");
//String studentno=request.getAttribute("studentNO").toString();
String name="学位申请信息登记卡";
response.setHeader("Content-Disposition", "inline; filename=\""+studentno+" "+new String( name.getBytes("gb2312"),
"ISO8859-1" )+".doc\"");
%>
%>
----------------------------------------------------------------------
下载下来的word让他不是以web样式打开
在 <w:WordDocument>下面加
<w:View>Print</w:View>
【java】下载word把word另存为jsp然后上面加上以下代码
最新推荐文章于 2021-12-30 15:53:19 发布