67,513
社区成员
发帖
与我相关
我的任务
分享
<!-- 以下代码都是在显示查询结果的页面中-->
<!--后台获取到的url -->
<%
String url=request.getScheme()+"://";
url+=request.getHeader("host");
url+=request.getRequestURI();
if(request.getQueryString()!=null)
url+="?"+request.getQueryString();
session.setAttribute("jumpBackUrl",url);
//out.println("后台获取到的url:"+url);
%>
<a href="javascript: jumpTOURL() ;">访问前台获取到的url</a>
<a href="javascript:window.location.href='${sessionScope.jumpBackUrl}' ">访问后台获取到的url</a>
<script type="text/javascript">
function showURL(){
var urlStr = self.location.href ;
//alert(urlStr);
}
<script>
<!-- 表格 -->
<table class="table">
<tr>
<th style="{width:20%;}">图书编号</th>
<th style="{width:6%;}">题名</th>
<th style="{width:9%;}">作者</th>
<th style="{width:9%;}">主题词</th>
<th style="{width:6%;}">索书号</th>
<th style="{width:9%;}">ISBN</th>
<th style="{width:4%;}">语言</th>
<th style="{width:8%;}">出版社</th>
<th style="{width:6%;}">标价</th>
<th style="{width:7%;}">藏书处</th>
<th style="{width:6%;}">预约借书</th>
<c:if test="${sessionScope.user=='worker2'}">
<th style="{width:7%;}">修改图书信息</th>
</c:if>
</tr>
<c:forEach items="${sessionScope.tmpPageBean.list}" var="books" varStatus="st">
<tr>
<td>${books.BUuid }</td>
<td>${books.BName }</td>
<td>${books.BAuthor }</td>
<td>${books.BKeyword }</td>
<td>${books.BCall }</td>
<td>${books.BIsbn }</td>
<td>${books.BLanguage }</td>
<td>${books.BPress }</td>
<td>${books.BValue }</td>
<td>${books.BLocate }</td>
<td style="{text-align: center;}">
<c:if test="${1==books.BIsborrowable}">
<a href="http://192.168.0.23:8080/MyLibrary/makeAppointment.action?BUuid=${books.BUuid}"
onclick="return(confirm('预约前请先了解预约规则,\n确实要进行预约么?'))">预约此书</a>
</c:if>
</td>
<c:if test="${sessionScope.user=='worker2'}">
<td style="{text-align: center;}">
<a href="#" onclick="edit('${books.BUuid }')">编辑</a>
<input type="button" onclick="edit('${books.BUuid }')" value="编辑"/>
</td>
</c:if>
</tr>
</c:forEach >
<!-- 页码 -->
<tr><td colspan="13" style="{text-align:right;}">
<%
PageBean myPageBean=(PageBean)session.getAttribute("tmpPageBean");
int totalPage=myPageBean.getTotalPage();
int currentPage=myPageBean.getCurrentPage();
int i=0;
%>
<c:if test="${sessionScope.tmpPageBean.currentPage!=1}">
<a href="http://192.168.0.23:8080/MyLibrary/jumpPage.action?page=1">[首页]</a>
<a href="http://192.168.0.23:8080/MyLibrary/jumpPage.action?page=${sessionScope.tmpPageBean.currentPage-1}">[上一页]</a>
</c:if>
<!-- 第一页到当前页 -->
<%
for(;i<currentPage-1;i++){
%>
<a href="http://192.168.0.23:8080/MyLibrary/jumpPage.action?page=<%= i + 1%>"><%=i + 1%></a>
<%
}
%>
<!-- 当前页 -->
<%= currentPage%>
<!-- 当前页到最后一页 -->
<%
for(i=currentPage;i>=currentPage&&i<totalPage;i++){
%>
<a href="http://192.168.0.23:8080/MyLibrary/jumpPage.action?page=<%= i + 1%>"><%=i + 1%></a>
<%
}
%>
<c:if test="${sessionScope.tmpPageBean.currentPage!=sessionScope.tmpPageBean.totalPage}">
<a href="http://192.168.0.23:8080/MyLibrary/jumpPage.action?page=${sessionScope.tmpPageBean.currentPage+1}">[下一页]</a>
<a href="http://192.168.0.23:8080/MyLibrary/jumpPage.action?page=${sessionScope.tmpPageBean.totalPage}">[尾页]</a>
</c:if>
<br> 共找到${sessionScope.tmpPageBean.allRow}条记录, 当前显示第${sessionScope.tmpPageBean.currentPage}页
</td></tr>
</table>
我想要刷新列表中发生改变的那行数据,怎么才能获取到我要刷新的元素的ID啊