📄 upload_ok.jsp
字号:
<%@ page contentType="text/html;charset=gb2312" %>
<%@ page language="java" import="com.jspsmart.upload.*"%>
<jsp:useBean id="mySmartUpload" scope="page" class="com.jspsmart.upload.SmartUpload" />
<HTML>
<BODY BGCOLOR="white">
<H1>上传附件:</H1>
<HR>
<%
// Variables
int count=0;
// Initialization
mySmartUpload.initialize(pageContext);
mySmartUpload.setTotalMaxFileSize(1000000000);
// Upload
mySmartUpload.upload();
try {
// Save the files with their original names in the virtual path "/upload"
// if it doesn't exist try to save in the physical path "/upload"
count = mySmartUpload.save("/webmail_sev/upload");
com.jspsmart.upload.File myFile = mySmartUpload.getFiles().getFile(0);
String fileName=myFile.getFileName();
out.println("文件名:"+fileName+"<br><br>");
// Display the number of files uploaded
out.println(count + " 个文件已经上传成功.<br><br>");
%>
<a href="javascript:fujianName()">关闭窗口</a>
<script language="javascript">
<!--
function fujianName()
{
opener.document.form1.fujian.value="<%=fileName%>";
self.close();
}
-->
</script>
<%
} catch (Exception e) {
out.println(e.toString());
}
%>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -