这部分都是套用的模板来设计添加界面
reader
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <!DOCTYPE html> <html> <head> <script type="text/javascript"> function checkpwd() { var x=document.getElementById("code").value; if(x.length>8||x.length<8) { alert("学号格式不正确") document.getElementById("code").value = ""; } } </script> <title>Insert title here</title> </head> <body style="text-align:center;"> <br><br><br> <form name="form2" action="addreader" method="post"> 学号<br> <input type="text" name="code" id="code" onblur="checkpwd()"> <br><br> 姓名<br> <input type="text" name="student"> <br><br> 性别 <br> <input type="radio" name="sex" value="男" > 男 <input type="radio" name="sex" value="女" > 女 <br><br> 学院<br> <input type="text" name="major"> <br><br> <input type="submit" value="写入"> </form> </body> </html>
book
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <!DOCTYPE html> <html> <head> <title>Insert title here</title> </head> <body style="text-align:center;"> <br><br><br> <form name="form2" action="addbook" method="post"> 书籍序列号<br> <input type="text" name="code" id="code" > <br><br> 书名<br> <input type="text" name="name"> <br><br> 作者<br> <input type="text" name="master"> <br><br> 出版单位<br> <input type="text" name="output"> <br><br> 最大借阅量<br><br> <input type="text" name="amount"> <br><br> <input type="submit" value="写入"> </form> </body> </html>