複製代碼代碼如下:
<%@ page語言=“ java” contentType =“ text/html; charset = utf-8”
頁面編碼=“ UTF-8”%>
<%
字符串路徑= request.getContextPath();
字符串basepath = request.getScheme() +“://”
+ request.getServername() +“:” + request.getServerport()
+路徑 +“/”;
string groupId = request.getParameter(“ groupId”);
%>
<! doctype html public' - // w3c // dtd html 4.01 transitional // en'“” http://www.org/tr/tr/html4/loose.dtd“>
<html>
<頭>
<meta http-equiv =“ content-type” content =“ text/html; charset = utf-8”>
<script type =“ text/javascript” src =“ http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js”> </script>
<meta content =“ width =設備寬度,初始尺度= 1.0,最大尺度= 1.0,用戶尺度= no“ name =“ viewport”>
<title>寶寶排行榜</title>
<style type =“ text/css”>
身體 {
文字平衡:中心;
保證金:0自動;
填充:0;
背景:#ffefe5;
寬度:100%;
}
答:鏈接{
文本介紹:無;
}
#靜止的 {
保證金:0自動;
文本平衡:左;
}
img {
寬度:100%;
}
#主要的 {
背景:url(“ ../ pic/bj_12.jpg”)repot-x;
填充:5px;
}
#Main Span {
字體大小:1.5em;
顏色:#2F0075;
左鍵:40px;
}
#底部 {
寬度:100%;
保證金:0;
填充:0;
字體大小:1EM;
}
#bottom ul li {
寬度:48%;
浮子:左;
邊緣左:-8%;
邊緣權利:10%;
列表式型:無;
}
.sp {
保證金頂:-50px;
邊界拉迪烏斯:8px;
}
</style>
<腳本類型=“ text/javascript”>
$(function(){
//動態加載寶貝排行信息
函數loadSecondSort(){
$ .ajax({
類型:“ post”,
數據:“ groupId =”+$(“#groupId”)。 val(),
URL:“ <%= basepath%> findbobyrankbyvote.action”,
成功:功能(數據){
var list = data.list;
var row =“”;
$(“ ul”)。空();
如果(list!= null && list.length!= 0){
for(var i = 0; i <list.length; i ++){
row =“ <li> <a href =/” bao_x.jsp? id =“+list [i] .id+“/”> <img src =/../
“ style =/”背景色:#ffb7cd;保證金頂:10px;高度:30px/“>”+
“ <img src =/” ../ pic/zan.png/“ style =/”寬度:22px;左鍵:10px;保證金頂:5px;/“ class =/” favor/“>”+
“ <span style =/”保證 - top:5px;顏色:#8A7DA9;浮點:對;邊緣右:10px;/“>已<span>”+list [i] .vote+“ </span>票”+
“ </span> </div> </li>”;
$(row).appendto($(“ ul”));
}
}
}
});
}
$(“。fair”)。 live(“ click”,function(){
var id = $(this).closest(“ li”)。查找(“#id”)。 val();
$。
功能(數據){
if(data.msg == null){
if(data.success == true){
loadSecondSort();
}
}別的 {
警報(data.msg);
}
});
});
window.onload = loadSecondSort();
});
</script>
</head>
<身體>
<input type =“隱藏” id =“ groupId” value =“ <%= groupId%>”>
<div id =“ static”>
<img src =“ ../ pic/pic/top10.jpg”> <a href =“ ../ jsp/index.jsp”> <img
src =“ ../ pic/fan.png”> </a>
<div ID =“ main”>
<span>近期排名:</span>
</div>
<div ID =“底部”>
<ul>
</ul>
</div>
</div>
</body>
</html>