📄 book_in.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<jsp:useBean id="ConnBean" scope="page" class="com.bean.db.conn" />
<%
try{
String str=request.getParameter("act");
if (str.equals("save"))
{
String bID=request.getParameter("bID");
String bName=request.getParameter("bName");
String bCbs=request.getParameter("bCbs");
String BZz=request.getParameter("BZz");
String BDj=request.getParameter("BDj");
String Bsl=request.getParameter("Bsl");
String sql="insert into book (bid,bname,bcbs,bzz,bdj,bsl) values ('"+bID+"','"+bName+"','"+bCbs+"','"+BZz+"','"+BDj+"',"+Bsl+")";
if(ConnBean.execute(sql).equals("OK")){
out.println("<script language='javascript'>alert('书号为:"+bID+"的图书已成功添加至图书库!');</script>");
}
}
}
catch(Exception e){
}
%>
<style type="text/css">
<!--
BODY {
BACKGROUND-IMAGE: none; BACKGROUND-COLOR: #ade3ff
}
.STYLE1 {
font-family: "楷体_GB2312";
font-weight: bold;
}
.STYLE2 {color: #ADE3FF}
-->
</style>
</head>
<body>
<div align="center">
<h2 class="STYLE1">新书入库</h2>
</div>
<form id="form1" name="form1" method="post" action="?act=save">
<label>
图书编号:
<input name="bID" type="text" id="bID" />
<br />
<br />
书<span class="STYLE2">——</span>名:
<input name="bName" type="text" id="bName" size="50" />
<br />
</label>
<p>
出<span class="STYLE2">-</span>版<span class="STYLE2">-</span>社:
<input name="bCbs" type="text" id="bCbs" size="50" />
</p>
<p>
作<span class="STYLE2">——</span>者:
<input name="BZz" type="text" id="BZz" />
</p>
<p>
定<span class="STYLE2">——</span>价:
<input name="BDj" type="text" id="BDj" />
</p>
<p>
数<span class="STYLE2">——</span>量:
<input name="Bsl" type="text" id="Bsl" />
</p>
<p>
<label>
<input type="submit" name="Submit" value="提交" />
</label>
</p>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -