📄 returnbook.jsp
字号:
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<%
String Path = request.getContextPath();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
<head>
<link href="<%=Path%>/css/style.css" rel="stylesheet">
<link href="<%=Path%>/css/main.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="<%=Path%>/js/dojo/dojo.js"></script>
<script type="text/javascript" src="<%=Path%>/js/lendbook.js"></script>
</head>
<body onload="javascript:document.showform.userCode.focus();">
<form action="" name="showform" method="post">
<!--RIGHT-->
<logic:present name="error"><%=request.getAttribute("error")%></logic:present>
<div class="right" align="left">
<div class="content" align="left">
<p align="center">
还书操作
</p>
<table width="742" border="1" style="margin-top: 10px">
<tr>
<td width="450" height="77">
<div id="usrInfo" class="usrInfo" align="left"
style="float: left;">
姓 名:
<input type="text" id="name" value="" />
单 位:
<input type="text" id="unit" value="" />
<br>
已 借:
<input type="text" id="userid" value="" />
年 龄:
<input type="text" id="age" value="" />
</div>
</td>
<td width="276">
<div id="numdiv" class="numdiv" align="left" style="float: left;">
图书证编号:
<input type="text" name="userCode" id="userCode" onkeydown="RselectUser(event)" />
</div>
</td>
</tr>
<tr>
<td height="82">
<div id="bookinfo" class="bookinfo" align=left
style="float: left;">
书 名:
<input type="text" id="bname" value="" name=""/>
作 者:
<input type="text" id="autor" value="" name=""/>
<br>
出版社:
<input type="text" id="pcom" value="" />
ISBN :
<input type="text" id="isbn" value="" name="isbn"/>
</div>
</td>
<td>
<div id="bnumdiv" class="bnumdiv" align="left"
style="float: left;">
图书条码号:
<input type="text" name="bookCode" id="bookCode"
onkeydown="selectBook(event)" />
</div>
</td>
</tr>
</table>
<br>
<div align="center">
<input type="button" value="确定归还" name="lendbutton" onkeydown="ReturnBook(event)" >
<script type="text/javascript">
function ReturnBook(obj){
if(obj.keyCode==13){
alert(dojo.byId("bookCode").value),
dojo.xhrGet({
url: "admin.do?method=ReturnBook", //要提交的页面地址
mimetype: "text/html", //请求的页面的类型,应该设置为与你请求页面类型对应的mimetype
method: "post",
preventCache: true,//解决IE缓存问题
content:{ bookCode : dojo.byId("bookCode").value,
userCode : dojo.byId("userCode").value},//传参数
load:helloCallback5, //type should be "load", data is that we wanted
error:helloError5 //error is dojo.io.Error
});
}
}
function helloCallback5(data,ioArgs) {
//window.alert(data);
dojo.byId("lendinfo").innerHTML=data;
}
function helloError5(data, ioArgs) {
//window.alert(data.innerHTML);
dojo.byId("lendinfo").innerHTML="输入信息有错误";
}
</script>
</div>
<div class="line">
图书借还记录
</div>
<div class="data_bot1" id="lendinfo" >
<table>
<tr>
<th>
图书条码号
</th>
<th>
书名
</th>
<th>
ISBN
</th>
<th>
读者条码号
</th>
<th>
读者姓名
</th>
<th>
借出时间
</th>
<th>
归还时间
</th>
<th>
罚款金额
</th>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<!--end RIGHT-->
</form>
</body>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -