我是学Java的,初学对Java不太了解,学末课设迫在眉睫,烦请大家出谋划策,在下感激不尽希望哪位高手帮忙
就剩这两天了,大家帮忙写一下,我学JAVA编程这个程序要依照JAVA的基本要求写,大家快点啊,我时间不多了,谢谢了是这样的,这个程序要求用标签和文本框单选复选下拉框做,J...
就剩这两天了,大家帮忙写一下,我学JAVA编程这个程序要依照JAVA的基本要求写,大家快点啊,我时间不多了,谢谢了
是这样的,这个程序要求用标签和文本框 单选 复选 下拉框 做,JLabel JTextField等,简单布局,给按钮加个时间,记录填写内容,我不会整这个,所以大家帮忙整一下,谢谢 展开
是这样的,这个程序要求用标签和文本框 单选 复选 下拉框 做,JLabel JTextField等,简单布局,给按钮加个时间,记录填写内容,我不会整这个,所以大家帮忙整一下,谢谢 展开
5个回答
展开全部
关一个页面没用 还要一个页面获得它的值 这样就行的通
首页index.jsp
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
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>
<base href="<%=basePath%>">
<title>注册</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<center>
<h1>欢迎注册</h1>
<hr>
<form action="su.jsp">
<table border="1">
<tr>
<td>姓名:</td>
<td><input type="text" id="username" name="username" size="18" /></td>
</tr>
<tr>
<td>密码:</td>
<td><input type="password" id="password" name="password" size="20" /></td>
</tr>
<tr>
<td>确认密码:</td>
<td><input type="password" id="newPassword" name="newPassword" size="20" /></td>
</tr>
<tr>
<td>身份证号:</td>
<td><input type="text" id="identity" name="identity" size="18" /></td>
</tr>
<tr>
<td>性别:</td>
<td>
<input type="radio" name="sex" value="男" />男
<input type="radio" name="sex" value="女"喊纯 />女
</td>
</tr>
<衡岩tr>
<td>生日:</td>
<td>
<input type="text" id="year" name="year" size="10" />年
<input type="text" id="month" name="month" size="5"/>月
<input type="text" id="day" name="day" size="5" />日
</td>
</tr>
<tr>
<td>爱好:</td>
<td>
<input type="checkbox" name="hobby" value="音乐"/>音乐
<input type="checkbox" name="hobby" value="体育"/>体育
<input type="checkbox" name="hobby" value="计算机"/>计算机
</td>
</tr>
</table>
<input type="submit" id="submit" name="submit" value="确认" />
<input type="reset" id="reset" name="reset" value="重置" />
</form>
</center>
</body>
</html>
再建一个接收信息页面 su.jsp
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
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>
<base href="<%=basePath%>">
<title>你注册的信息</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<center>
<h1>你注册的信息</h1>
<hr>
<table border="1">
<tr>
<td>姓名:</td>
<td><%=request.getParameter("username") %></td>
</tr>
<tr>
<td>密码:</td>
<td><%=request.getParameter("password") %></td>
</tr>
<tr>
<td>身份证号:</td>
<td><%=request.getParameter("identity") %></td>
</tr>
<tr>
<td>性别:</td>
<td>
<%=request.getParameter("sex") %>
</td>
</tr>
<tr>
<td>生日:</td>
<td>
<%=request.getParameter("year") %>年<%=request.getParameter("month") %>月<%=request.getParameter("day") %>日
</td>
</tr>
<tr>
<td>爱好:</td>
<td>
<% String[] hobbys=request.getParameterValues("hobby");
int i=0;
for(String s:hobbys){
i++;
if(i==hobbys.length)
out.print(s);
else
out.print(s+",");
}
%>
</td>
</tr>
</table>
</center>
</body>
</html>
首页index.jsp
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
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>
<base href="<%=basePath%>">
<title>注册</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<center>
<h1>欢迎注册</h1>
<hr>
<form action="su.jsp">
<table border="1">
<tr>
<td>姓名:</td>
<td><input type="text" id="username" name="username" size="18" /></td>
</tr>
<tr>
<td>密码:</td>
<td><input type="password" id="password" name="password" size="20" /></td>
</tr>
<tr>
<td>确认密码:</td>
<td><input type="password" id="newPassword" name="newPassword" size="20" /></td>
</tr>
<tr>
<td>身份证号:</td>
<td><input type="text" id="identity" name="identity" size="18" /></td>
</tr>
<tr>
<td>性别:</td>
<td>
<input type="radio" name="sex" value="男" />男
<input type="radio" name="sex" value="女"喊纯 />女
</td>
</tr>
<衡岩tr>
<td>生日:</td>
<td>
<input type="text" id="year" name="year" size="10" />年
<input type="text" id="month" name="month" size="5"/>月
<input type="text" id="day" name="day" size="5" />日
</td>
</tr>
<tr>
<td>爱好:</td>
<td>
<input type="checkbox" name="hobby" value="音乐"/>音乐
<input type="checkbox" name="hobby" value="体育"/>体育
<input type="checkbox" name="hobby" value="计算机"/>计算机
</td>
</tr>
</table>
<input type="submit" id="submit" name="submit" value="确认" />
<input type="reset" id="reset" name="reset" value="重置" />
</form>
</center>
</body>
</html>
再建一个接收信息页面 su.jsp
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
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>
<base href="<%=basePath%>">
<title>你注册的信息</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<center>
<h1>你注册的信息</h1>
<hr>
<table border="1">
<tr>
<td>姓名:</td>
<td><%=request.getParameter("username") %></td>
</tr>
<tr>
<td>密码:</td>
<td><%=request.getParameter("password") %></td>
</tr>
<tr>
<td>身份证号:</td>
<td><%=request.getParameter("identity") %></td>
</tr>
<tr>
<td>性别:</td>
<td>
<%=request.getParameter("sex") %>
</td>
</tr>
<tr>
<td>生日:</td>
<td>
<%=request.getParameter("year") %>年<%=request.getParameter("month") %>月<%=request.getParameter("day") %>日
</td>
</tr>
<tr>
<td>爱好:</td>
<td>
<% String[] hobbys=request.getParameterValues("hobby");
int i=0;
for(String s:hobbys){
i++;
if(i==hobbys.length)
out.print(s);
else
out.print(s+",");
}
%>
</td>
</tr>
</table>
</center>
</body>
</html>
展开全部
只实现这一个效果吗~
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<center>
<h1>欢迎注册</h1>
<hr>
<form>
<table>
<tr>
<td>姓名:</td>
<td><input type="text" id="username" name="username" size="18" /></td>
</tr>
<tr>
<td>密码:</td>
<td><input type="password" id="password" name="password" size="20" /></td>
</tr>
<tr>
<td>确认密码:</td>
<td><input type="password" id="newPassword" name="newPassword" size="20" /></td>
</tr>
<tr>
<td>身份证号:</td>
<td><input type="text" id="identity" name="identity" size="18" /></td>
</tr>
<tr>
<td>性别:</td>
<td>
<input type="radio" id="sex" name="贺唯铅sex" />男
<input type="radio" id="sex" name="sex" />女
</td>
</tr>
<tr>
<td>生日:</td>
<td>
<input type="text" id="year" name="year" size="10" />年
<input type="text" id="month" name="month" size="5"/>月
<input type="text" id="day" name="day" size="5" />日
</td>
</tr>
<tr>
<td>爱好:</td>
<td>
<input type="checkbox" id="hobby" name="hobby" />音乐
<input type="checkbox" id="hobby" name="hobby" />体育
<input type="checkbox" id="hobby" name="hobby" />计算机
</td>
<禅好/tr>
</table>
<input type="submit" id="submit" name="submit"山旁 value="确认" />
<input type="reset" id="reset" name="reset" value="重置" />
</form>
</center>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<center>
<h1>欢迎注册</h1>
<hr>
<form>
<table>
<tr>
<td>姓名:</td>
<td><input type="text" id="username" name="username" size="18" /></td>
</tr>
<tr>
<td>密码:</td>
<td><input type="password" id="password" name="password" size="20" /></td>
</tr>
<tr>
<td>确认密码:</td>
<td><input type="password" id="newPassword" name="newPassword" size="20" /></td>
</tr>
<tr>
<td>身份证号:</td>
<td><input type="text" id="identity" name="identity" size="18" /></td>
</tr>
<tr>
<td>性别:</td>
<td>
<input type="radio" id="sex" name="贺唯铅sex" />男
<input type="radio" id="sex" name="sex" />女
</td>
</tr>
<tr>
<td>生日:</td>
<td>
<input type="text" id="year" name="year" size="10" />年
<input type="text" id="month" name="month" size="5"/>月
<input type="text" id="day" name="day" size="5" />日
</td>
</tr>
<tr>
<td>爱好:</td>
<td>
<input type="checkbox" id="hobby" name="hobby" />音乐
<input type="checkbox" id="hobby" name="hobby" />体育
<input type="checkbox" id="hobby" name="hobby" />计算机
</td>
<禅好/tr>
</table>
<input type="submit" id="submit" name="submit"山旁 value="确认" />
<input type="reset" id="reset" name="reset" value="重置" />
</form>
</center>
</body>
</html>
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<center>
<h1>欢迎注册</h1>
<hr>
<form>
<table>
<tr>
<td>姓名:</td>
<td><input type="text" id="username" name="username" size="18" /></td>
</tr>
<tr>
<td>密码:</td>
<td><input type="password" id="password" name="password" size="20" /></td>
</tr>
<tr>
<td>确认密码:</td>
<td><input type="password" id="newPassword" name="newPassword" size="20" /></td>
</tr>
<tr>
<td>身份证号:</td>
<td><input type="text" id="键乎identity" name="identity" size="18" /></td>
</tr>
<tr>
<td>性别:</td>
<td>
<input type="radio" id="sex" name="sex" /橘猛>男
<input type="radio" id="sex" name="sex" />女
</td>
</tr>
<tr>
<td>生日:</td>
<td>
<input type="text" id="year" name="year" size="10" />年
<input type="text" id="month" name="month" size="5"/>月
<input type="text" id="day"圆亮桥 name="day" size="5" />日
</td>
</tr>
<tr>
<td>爱好:</td>
<td>
<input type="checkbox" id="hobby" name="hobby" />音乐
<input type="checkbox" id="hobby" name="hobby" />体育
<input type="checkbox" id="hobby" name="hobby" />计算机
</td>
</tr>
</table>
<input type="submit" id="submit" name="submit" value="确认" />
<input type="reset" id="reset" name="reset" value="重置" />
</form>
</center>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<center>
<h1>欢迎注册</h1>
<hr>
<form>
<table>
<tr>
<td>姓名:</td>
<td><input type="text" id="username" name="username" size="18" /></td>
</tr>
<tr>
<td>密码:</td>
<td><input type="password" id="password" name="password" size="20" /></td>
</tr>
<tr>
<td>确认密码:</td>
<td><input type="password" id="newPassword" name="newPassword" size="20" /></td>
</tr>
<tr>
<td>身份证号:</td>
<td><input type="text" id="键乎identity" name="identity" size="18" /></td>
</tr>
<tr>
<td>性别:</td>
<td>
<input type="radio" id="sex" name="sex" /橘猛>男
<input type="radio" id="sex" name="sex" />女
</td>
</tr>
<tr>
<td>生日:</td>
<td>
<input type="text" id="year" name="year" size="10" />年
<input type="text" id="month" name="month" size="5"/>月
<input type="text" id="day"圆亮桥 name="day" size="5" />日
</td>
</tr>
<tr>
<td>爱好:</td>
<td>
<input type="checkbox" id="hobby" name="hobby" />音乐
<input type="checkbox" id="hobby" name="hobby" />体育
<input type="checkbox" id="hobby" name="hobby" />计算机
</td>
</tr>
</table>
<input type="submit" id="submit" name="submit" value="确认" />
<input type="reset" id="reset" name="reset" value="重置" />
</form>
</center>
</body>
</html>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
这就一个界面,有什么用?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
找一本JAVA基础书做一下就可以了。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询