【JSP开源代码栏目提醒】:文章导读:在新的一年中,各位网友都进入紧张的学习或是工作阶段。网学会员整理了JSP开源代码-index_add.jsp的相关内容供大家参考,祝大家在新的一年里工作和学习顺利!
<%@ page language="java" contentType="text/html; charset=gb2312" import="java.sql.*"%>
<jsp:useBean id="db" class="yhgl.connectDB" />
<html>
<head>
<title>投票管理</title>
<script language="javascript">
function add()
{
if(form1.topic.value.length == 0)
{
alert("投票名称不能为空!");
}
else
{
if(form1.choice.value.length == 0)
{
alert("投票选项不能为空!");
}
else
{
form1.submit();
}
}
}
</script>
</head>
<body>
<form action="update_deal.jsp" method="post" name="form1">
<table>
<tr>
<td width="20%">投票名称:</td>
<td width="80%"><input type=text name="topic"><input type="hidden" value="no" name="id" /></td>
</tr>
<tr>
<td width="20%">投票选项:</td>
<td width="80%"><input type=text name="choice">(多个选项以空格分割)</td>
</tr>
<tr>
<td colspan="2"><input type="button" value="新建" onclick="add()"></td>
</tr>
</table>
</form>
</body>
</html>
上一篇:
indexTemplate.jsp
下一篇:
法律专业开题报告范文