?? buddylist.jsp
字號(hào):
<%@ page language="java" pageEncoding="UTF-8"
contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/fmt.tld" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//Dtd html 4.0 transitional//EN">
<html>
<head>
<title>好友名單</title>
<link href="<c:url value='/css/style.css' />" rel="stylesheet" type="text/css">
<script type="text/javascript" src="<c:url value='/js/common.js' />" ></script>
<script type="text/javascript">
function subPage(){
var page=document.getElementById("page").value;
document.location='<c:url value='buddyList.action' />?currentPage='+page;
}
function addFriend(){
document.forms.buddyListForm.action="<c:url value='searchMember.action' />";
document.all("buddyListForm").submit();
}
function delBuddy(){
cCount = getCheckedCount("nickName");
if (cCount == 0){
alert("請(qǐng)至少一條信息!");
return;
}
if (confirm("確定刪除嗎?")==false){
return false;
}
document.forms.buddyListForm.action="<c:url value='deleteBuddy.action' />";
document.all("buddyListForm").submit();
}
</script>
</head>
<body>
<form method="post" name="buddyListForm">
<table width="760" border="0" style="margin:20px 0;" align="center"
cellpadding="0" cellspacing="0">
<tr>
<td colspan="3">
<table cellpadding="0" cellspacing="0" width="100%" height="62">
<tr>
<td background="<c:url value='/images/tab01.gif' />" width="309" valign="top">
<div class="tabhead">
系統(tǒng)訊息 - 好友列表
</div>
</td>
<td valign="bottom">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td background="<c:url value='/images/topcenter.gif' />" width="100%"
valign="top" align="right" style='padding:6px 0 0 0px;'>
<span class="Searchout"
onmouseout="this.className='Searchout';"
onmouseover="this.className='Searchover';"
onclick="javascript:addFriend();">
<img src="<c:url value='/images/icon06.gif' />" height="14"> 添加</span>
<span
onclick="javascript:delBuddy();"
onmouseout="this.className='Delout';"
onmouseover="this.className='Delover';" class="Delout">
<img src="<c:url value='/images/delete.gif' />" height="14"/> 刪除</span>
</td>
<td><img src="<c:url value='/images/topright.gif' />"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td background="<c:url value='/images/centerleft.gif' />"></td>
<td width="100%">
<table width="100%" border="0" cellspacing="1" cellpadding="3"
align="center">
<tr>
<td width="10%" align="center">
<b>選擇</b>
</td>
<td width="20%" align="center">
<b>姓名</b>
</td>
<td width="20%" align="center" >
<b>性別</b>
</td>
<td width="20%" align="center" >
<b>年齡</b>
</td>
<td width="20%" align="center" >
<b>來自</b>
</td>
<td width="10%" align="center" >
<b>操作</b>
</td>
</tr>
<tr>
<td bgcolor="#cccccc" colspan="6" height="3"></td>
</tr>
<c:forEach items="${requestScope.buddyList}" var="buddy" >
<tr bgcolor="#e6ffd6">
<td width="10%" align="center">
<input type="checkbox" name="nickName" value="${buddy.nickName}" />
</td>
<td width="20%" align="center">
${buddy.nickName}
</td>
<td width="20%" align="center">
<c:choose >
<c:when test="${buddy.gender=='0'}">男</c:when>
<c:otherwise>女</c:otherwise>
</c:choose>
</td>
<td width="20%" align="center" >
${buddy.age}
</td>
<td width="20%" align="center">
${buddy.provinceCity.name}
</td>
<td width="10%" align="center">
<img src="<c:url value='/images/button_delete.gif' />" alt="移動(dòng)到黑名單" onclick="window.location='<c:url value='moveToBlackList.action' />?blackName=${buddy.nickName}'" style="cursor:hand"/>
</td>
</tr>
<tr>
<td bgcolor="#cccccc" colspan="6" height="3"></td>
</tr>
</c:forEach>
<tr>
<td align="left" width="30%" colspan="2">
選擇:<a href="#" onclick="javascript:selAllCheckbox('nickName');">全部</a>-
<a href="#" onclick="javascript:unselAllCheckbox('nickName');">不選</a>-
<a href="#" onclick="javascript:reAllCheckbox('nickName');">反選</a>
</td>
<td colspan="4" align="right">
共
<span class="fontred">${requestScope.buddy_TotalNum}</span> 條信息 當(dāng)前第
<span class="fontred">${requestScope.currentPage}</span> 頁 共有
<span class="fontred">${requestScope.buddy_TotalPage}</span> 頁
<c:choose>
<c:when test="${requestScope.currentPage==1}">
<c:choose>
<c:when test="${requestScope.buddy_TotalPage==1}" >
上一頁/下一頁
</c:when>
<c:otherwise>
上一頁/<a href="#" onclick="self.location='<c:url value='/pages/messenger/buddyList' />?currentPage=${requestScope.currentPage+1}'">下一頁</a>
</c:otherwise>
</c:choose>
</c:when>
<c:when test="${requestScope.currentPage==requestScope.buddy_TotalPage}">
<a href="#" onclick="self.location='<c:url value='/pages/messenger/buddyList' />?currentPage=${requestScope.currentPage-1}'">上一頁</a>/下一頁
</c:when>
<c:otherwise>
<a href="#" onclick="self.location='<c:url value='/pages/messenger/buddyList' />?currentPage=${requestScope.currentPage-1}'">上一頁</a>/<a href="#" onclick="self.location='<c:url value='/pages/messenger/buddyList' />?currentPage=${requestScope.currentPage+1}'">下一頁</a>
</c:otherwise>
</c:choose>
轉(zhuǎn)到
<select name="select" id="page" onchange="subPage();" style="width: 50;height: 25">
<c:forEach begin="1" end="${requestScope.buddy_TotalPage}" var="num">
<c:choose>
<c:when test="${requestScope.currentPage==num}">
<option value="${num}" selected>${num}</option>
</c:when>
<c:otherwise>
<option value="${num}" >${num}</option>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
</td>
</tr>
</table>
</td>
<td background="<c:url value='/images/centeright.gif' />"></td>
</tr>
<tr>
<td>
<img src="<c:url value='/images/bottomleft.gif' />">
</td>
<td background="<c:url value='/images/bottomcenter.gif' />"></td>
<td>
<img src="<c:url value='/images/bottomright.gif' />">
</td>
</tr>
</table>
</form>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -