📄 addstu.jsp
字号:
<%@ page contentType="text/html;charset=gb2312" %>
<script language="javascript">
function on_submit()
{//验证数据的合法性
if (form1.stu_id.value== "")
{
alert("学号不能为空,请输入学号!");
form1.stu_id.focus();
return false;
}
if (form1.stuname.value== "")
{
alert("姓名不能为空,请输入姓名!");
form1.stuname.focus();
return false;
}
if (form1.password.value== "")
{
alert("密码不能为空,请输入密码!");
form1.password.focus();
return false;
}
if (form1.repassword.value== "")
{
alert("确认密码不能为空,请输入密码!");
form1.repassword.focus();
return false;
}
if (form1.password.value!= form1.repassword.value)
{
alert("密码与确认密码不同");
form1.password.focus();
return false;
}
}
</script>
<head>
<title>添加新学生</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><style type="text/css">
<!--
body {
-->
</style></head>
<body>
<center>
<p> </p>
<p> </p>
<table border="1" width="516">
<tr bgcolor="#0000CC">
<th colspan="2" align="center">添加新学生窗口</th>
</tr>
<form action="Stu_acceptadd.jsp" method="post" onsubmit="return on_submit()" name="form1">
<tr bgcolor="#FFFFFF">
<td width="46%" height="43"><div align="right">学生编号:</div></td>
<td width="54%"><input name="stu_id" type="text" size="30"></td>
</tr><tr bgcolor="#FFFFFF">
<td width="46%" height="43"><div align="right">学生姓名:</div></td>
<td width="54%"><input name="stuname" type="text" size="30"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="44" ><div align="right">密码:</div></td>
<td ><input name="password" type="password" size="30"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="40" ><div align="right">再输入一次密码:</div></td>
<td ><input name="repassword" type="password" size="30"></td>
</tr>
<tr bgcolor="#0000CC">
<td height="46" colspan="2" align="center">
<input type="submit" value="提交"><input type="reset" value="重输"></td>
</tr>
</form>
</table>
</center>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -