日期:2014-05-18  浏览次数:20650 次

如何弹出保存浏览对话框~???
在页面当中如何能够弹出保存浏览对话框,用js、vbs或其它任何可以做到的话,希望能给个提示~

问题解决马上结贴

------解决方案--------------------
你的意思是保存成功以后出个提示?

<%if(request.getAttribute( "msg ")!=null)
{%>
<script>
alert( ' <%=request.getAttribute( "msg ")%> ');
</script>
<%
}
%>
放在jsp页面最后,request.setAttribute( "msg ", "保存成功提示 ")
你要是用taglib的话,也可以把显示逻辑用logic标签控制
------解决方案--------------------
response.header( "Content-Disposition ", "attachment;filename= "+filename);
------解决方案--------------------
File downloadFile;
response.setContentType( "application/csv ");
response.setHeader( "Content-disposition ",
"attachment; filename=\ " " + downloadFile.getName() +
"\ " ");
BufferedInputStream bufInStream = new BufferedInputStream(new
FileInputStream(downloadFile));
BufferedOutputStream bufOutStream = new BufferedOutputStream(response.
getOutputStream());
int readLine = 0;
readLine = bufInStream.read();
while (readLine != -1) {
bufOutStream.write(readLine);
readLine = bufInStream.read();
}
bufOutStream.close();
bufInStream.close();
downloadFile = null;
------解决方案--------------------
不知道你说的意思啊
------解决方案--------------------
不知道这是不是你要的效果:

<input type= "file " name= "uploadFile " />
------解决方案--------------------
不需要的啦,你写好下载的东西后,
response.setContentType( "application/csv ");
response.setHeader( "Content-disposition ",
"attachment; filename=\ " " + downloadFile.getName() +
"\ " ");

具体的我明天到公司了帮你看看,它会自动弹出来的啊