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

📄 add.jsp

📁 添加、修改、删除。实在jsp环境下用java 编写的。请多多指教。又不完善之处请指正
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!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=gb2312">
<title>无标题文档</title>
</head>

<body>
<script language="javascript">
function checknum(){
if(aform.ID.valueff=="")
window.alert("填写ID","警告信息");
else
if(aform.name.value=="")
window.alert("填写姓名","");
else
if(aform.age.value=="")
window.alert("填写年龄","");
else
if(aform.addr.value=="")
window.alert("填写地址","");
else
if(aform.tel.value=="")
window.alert("填写电话","");
else
aform.submit();

}
</script>
<%@  include file="check.jsp" %>
<form method="POST" action="add2.jsp"  name="aform">
  <!--webbot bot="SaveResults" U-File="fpweb:///_private/form_results.txt"
  S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
   
  <p>ID*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          
    <!--webbot
  bot="Validation" S-Data-Type="Number" S-Number-Separators=",."
  S-Validation-Constraint="Greater than or equal to" S-Validation-Value="1"
  S-Validation-Constraint="Less than" S-Validation-Value="99999" -->
    <input name="ID" type="text" size="20" maxlength="20">
   </p>
  <p>姓名*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <!--webbot bot="Validation"
  S-Data-Type="String" B-Value-Required="TRUE" I-Minimum-Length="2"
  I-Maximum-Length="4" --> 
    <input name="name" type="text" size="20" maxlength="4">
  </p>
  <p>年龄*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <!--webbot bot="Validation"
  S-Data-Type="Integer" S-Number-Separators=","
  S-Validation-Constraint="Greater than or equal to" S-Validation-Value="1"
  S-Validation-Constraint="Less than or equal to" S-Validation-Value="100" --> <input name="age" type="text" size="20" maxlength="2">
  </p>
  <p>地址*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <!--webbot bot="Validation"
  S-Data-Type="String" B-Value-Required="TRUE" I-Minimum-Length="2"
  I-Maximum-Length="20" --> <input name="addr" type="text" size="20" maxlength="20">
  </p>
  <p>电话*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <!--webbot bot="Validation"
  S-Data-Type="Number" S-Number-Separators=",." B-Value-Required="TRUE"
  I-Minimum-Length="8" I-Maximum-Length="11" --> 
    <input name="tel" type="text" size="20" maxlength="16">
  </p>
  <p>
    <input type="button" value="提交" name="B1" onClick="checknum()"><input type="reset" value="全部重写" name="B2"></p>
</form>
</div>

</body>
</html>

⌨️ 快捷键说明

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