复制代码代码如下:
<%@ 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>