📄 man_add.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
BODY {
BACKGROUND-IMAGE: none; BACKGROUND-COLOR: #ade3ff
}
.STYLE5 {color: #FFFFFF; font-weight: bold; }
.STYLE6 {color: #FF0000}
-->
</style>
<jsp:useBean id="ConnBean" scope="page" class="com.bean.db.conn" />
</head>
<%
try{
String str=request.getParameter("act");
if (str.equals("add"))
{
String user=request.getParameter("user");
String pass=request.getParameter("pass");
String sql="insert into admin (user,pass) values ('"+user+"','"+pass+"')";
if(ConnBean.execute(sql).equals("OK")){
out.println("<script language='javascript'>alert('添加图书管理员成功');</script>");
}
}
}
catch(Exception e){
}
%>
<body>
<form id="form1" name="form1" method="post" action="?act=add">
<label>
<div align="center">
<h2> </h2>
<h2> </h2>
<h2><span class="STYLE6">添加图书管理员</span></h2>
<br />
账号:
<input name="user" type="text" id="user" />
<br />
密码:
<input name="pass" type="text" id="pass" />
<p>
<input type="submit" name="Submit" value="提交" />
</p>
</div>
</label>
<label></label>
<label></label>
<label></label>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -