📄 addvote.jsp
字号:
<%@ page language="java" import="java.util.*" contentType="text/html;charset=GBK"%>
<% String n=request.getParameter("n");
if(n==null){
n="4";
}
%>
<%
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>
<table width="100%" border="0" align="center" cellpadding="0"
cellspacing="1" bgcolor="#000000">
<tr>
<td width="" height="30" bgcolor="#F0F0F0">
<table width="100%" border="0">
<tr>
<td width="300">>>添加投票</td>
<td width="200"><a href="admin/index.jsp">首页</a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="746" height="349" bgcolor="#F0F0F0">
<form action="/vote/servlet/AddVoteServlet" method="post" name="form1">
<table width="70%" height="224" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#999999">
<tr>
<td width="100%" height="18" bgcolor="#F0F0F0"></td>
</tr>
<tr>
<td height="25" bgcolor="#F0F0F0" >选项个数:
<input name="n" type="text" size="6" onChange="location.href='addvote.jsp?n='+form1.n.value;" value="<%= n %>" />
<input name="B3" type="button" value="确定" />
</td>
</tr>
<tr>
<td height="25" bgcolor="#F0F0F0">主题:<input name="title" type="text" size="38" /></td>
</tr>
<tr>
<td height="25" bgcolor="#F0F0F0">方式:<input name="stile" type="radio" value="radio" checked />单选
<input name="stile" type="radio" value="checkbox" />多选 </td>
</tr>
<tr>
<td height="25" bgcolor="#F0F0F0">开始时间:<select size="1" name="startyear">
<option value="2005" selected>2005</option>
<% for(int i=6;i<10;i++){
out.print("<option value=200"+i+">200"+i+"</option>");
}
%>
</select>年<select size="1" name="startmonth">
<option value="1" selected>1</option>
<% for(int i=2;i<13;i++){
out.print("<option value="+i+">"+i+"</option>");
}
%>
</select>月<select size="1" name="startday">
<option value="1" selected>1</option>
<% for (int i=2;i<32;i++){
out.print("<option value="+i+">"+i+"</option>");
}
%>
</select>日 </td>
</tr>
<tr>
<td height="25" bgcolor="#F0F0F0">结束时间:<select size="1" name="endyear">
<option value="2005" selected>2005</option>
<% for(int i=6;i<10;i++){
out.print("<option value=200"+i+">200"+i+"</option>");
}
%>
</select>年<select size="1" name="endmonth">
<option value="1" selected>1</option>
<% for(int i=2;i<13;i++){
out.print("<option value="+i+">"+i+"</option>");
}
%>
</select>月<select size="1" name="endday">
<option value="1" selected>1</option>
<% for (int i=2;i<32;i++){
out.print("<option value="+i+">"+i+"</option>");
}
%>
</select>日 </td>
</tr>
<% for (int i=1;i<=Integer.parseInt(n);i++){
%>
<tr>
<td height="25" bgcolor="#F0F0F0">选项<%= i %>:
<input name="option<%=i%>" type="text" /></td>
</tr>
<% }
%>
<tr>
<td height="25" bgcolor="#F0F0F0">设为当前调查项目:<input name="active" type="radio" value="1" checked />是
<input name="active" type="radio" value="0" />否 </td>
</tr>
<tr>
<td height="25" bgcolor="#F0F0F0" align="center"><input name="B1" type="submit" value="提交" />
<input name="B2" type="reset" value="取消" />
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -