⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 upload.jsp.svn-base

📁 关于Struts2的初体验
💻 SVN-BASE
字号:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>My JSP 'upload.jsp' starting page</title>

		<script type="text/javascript">
			function add()
			{
				var td = document.getElementById("more");
				
				var br = document.createElement("br");
				var input = document.createElement("input");
				var button = document.createElement("input");
				
				input.type = "file";
				input.name = "file";
				
				button.type = "button";
				button.value = "remove";
				
				button.onclick = function()
				{
					td.removeChild(br);
					td.removeChild(input);
					td.removeChild(button);
				}
				
				td.appendChild(br);
				td.appendChild(input);
				td.appendChild(button);
				
			}
		</script>

	</head>

	<body>
		
		<table align = "center">
			<tr>
				<td><s:fielderror cssStyle="color:red"/></td>
			</tr>
		</table>
	
		<s:form action="upload" method="post" enctype="multipart/form-data"
			theme="simple">
			<table border="1" align="center">
				<tr>
					<td>
						文件:
					</td>
					<td id="more">
						<s:file name="file"></s:file>
						<input type="button" name="addMore" value="增加" onclick="add()" />
					</td>
				</tr>
				<tr>
					<td colspan="2" align="right">
						<s:submit></s:submit>

					</td>

				</tr>
			</table>
		</s:form>
	</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -