java代码:
byte abyte1[];
response.addHeader("Content-Disposition:", "inline;filename="+ Id + ".pdf");
response.setContentType("application/pdf");
response.setContentLength(abyte1.length);
response.getOutputStream().write(abyte1);
response.getOutputStream().flush();
JS代码
window.open("xxxxxxx");
这个怎么解决,在google、360等浏览器都没有问题
问题已经解决了,解决方式为修改js中的window.open("xxxx")为a.click()
IE8对js的兼容性太差了!
在线等各位大牛现身啊 o(╯□╰)o
response.addHeader("Content-Disposition:", "inline;filename="+ Id + ".pdf");
改为
response.addHeader("Content-Disposition:", "attachment;filename="+ Id + ".pdf");
试试