📄 upload.jsp
字号:
<%@include file="/common/taglibs.jsp"%>
<%@ page contentType="text/html; charset=GBK"%>
<%
String contextPath = request.getContextPath();
String fileFileName = request.getParameter("fileFileName");
String uploadPath = request.getParameter("path");
%>
<html>
<head>
<title>{*[Upload file]*}</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="<%= contextPath %>/css/css.jsp" type="text/css">
<link rel="stylesheet"
href="<c:out value='${pageContext.request.contextPath}'/>/resource/css/main.css"
type="text/css">
<script src="<%= contextPath %>/script/util.js"></script>
<script language="JavaScript">
<!--
function ev_add() {
if (document.uploadForm.upload.value=="") {
alert("{*[Invalid file]*}!");
return;
}
else {
tips.style.display='';
frm.style.display='none';
document.uploadForm.submit();
}
}
function ev_doEmpty() {
tips.style.display='';
frm.style.display='none';
document.uploadForm.action = '<ww:url action="delete" />';
document.uploadForm.submit();
}
// -->
</script>
</head>
<body>
<table width="98%">
<tr>
<td width="10" class="image-label"><img
src="<ww:url value="/resource/image/email2.jpg"/>" /></td>
<td width="3"></td>
<td width="110" class="text-label">{*[Upload File]*}</td>
<td>
<table width="100%" border=1 cellpadding="0" cellspacing="0"
class="line-position">
<tr>
<td></td>
</tr>
</table>
</td>
</tr>
</table>
<div id="tips" style="display:none">
<table width=100% height=100% align=center cellpadding=0 cellspacing=0 border=0 >
<tr>
<td align=center valign=middle><img src="<%=contextPath%>/resource/images/wait.gif"></td>
</tr>
</table>
</div>
<div id="frm">
<ww:form name="uploadForm" enctype="multipart/form-data" action="upload" method="post">
<ww:if test="hasFieldErrors()">
<span class="errorMessage"> <b>Errors:</b><br>
<ww:iterator value="fieldErrors">
*<ww:property value="value[0]" />;
</ww:iterator> </span>
</ww:if>
<table width="100%" valign="top" border="0" cellspacing="0" cellpadding="0">
<tr>
<!-- 不同的path保存到不同的目录 uploads/xxxx/ -->
<ww:hidden name="path" value="<%=request.getParameter("path")%>"/>
<ww:hidden name="fieldValue" value="%{#parameters.fieldValue}" />
<ww:hidden name="allowedTypes" value="%{#parameters.allowedTypes}" />
<td align="right"><label class="label">{*[Upload file]*}:</label></td>
<td>
<ww:file name="upload" theme="simple" />
</td>
</tr>
<tr><td height="10px">
</td></tr>
<tr>
<td align="center" colspan="2">
<input type="button" name="btnAdd" value="{*[Upload]*}" onclick="ev_add()">
<input type="button" class="btcss" value="{*[Clear]*}" onclick="ev_doEmpty()">
</td>
</tr>
</table>
</ww:form>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -