📄 file_upload.jsp
字号:
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>上传文件</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../css/default.css"/>
<script language="JavaScript" src="../js/calendar.js"></script>
<script type="text/javascript">
function closeWin(){
history.go(-1);
}
var count=1 ;
function additem(id)
{
var row,cell,str;
row = document.getElementById(id).insertRow(count+1);
if(row != null )
{
row.insertCell(0).innerHTML="<tr><td align=\"right\">上传文件: <input type='file' name='file' style='background-color:white'></td></tr>";
count ++;
}
}
function $(name){
return document.getElementById(name);
}
</script>
<s:head theme="ajax"/>
</head>
<body>
<s:form action="fileUpload.action" theme="simple" onsubmit="return checkAll();" method="post" enctype ="multipart/form-data">
<table class="default" id ="tb" align="center">
<tr class="title">
<td colspan="2" align="center">批量上传文件</td>
</tr>
<tr>
<td algin="right">
上传文件:
<input type="file" name="file" style="background-color:white"></td>
</tr>
<tr>
<td algin="right">
上传文件:
<input type="file" name="file" style="background-color:white"><input type="button" name="add" onclick="additem('tb')" value="更多"/></td>
</tr>
<tr>
<td algin="right">
访问密码:
<input type="password" name="filePassword" style="background-color:white"> (<font color="red">可为空</font>)</td>
</tr>
<tr>
<td algin="right">
确认密码:
<input type="password" name="afirmPassword" style="background-color:white"> (<font color="red">可为空</font>)</td>
</tr>
<tr>
<td algin="right">
上传目录:
<s:select
tooltip="选择存放目录"
label="可选文件目录"
list="#request.folderList"
name="fileFolder"
headerKey="root"
headerValue="root"/></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="button" name="close" onclick="closeWin()" value="返回窗口" class="btn"><input type="submit" name="submit" value="确认上传" class="btn"></td>
</tr>
</table>
</s:form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -