复制代码代码如下:
<%@ page language = "java" contentType = "text/html; charset = utf-8"
pageencoding = "utf-8"%>
<%
String path = request.getContextPath ();
String basePath = request.getScheme () + ": //"
+ request.getServername () + ":" + request.getServerport ()
+ path + "/";
String GroupId = request.getParameter ("GroupId");
%>
<! Doctype html public "-// w3c // dtd html 4.01 transitional // en" "http://www.w3.org/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, пользовательский scalbable = no" name = "viewport">
<title> 宝宝排行榜 </title>
<стиль типа = "text/css">
тело {
Текст-альбом: Центр;
Поле: 0 Авто;
Заполнение: 0;
Фон: #ffefe5;
Ширина: 100%;
}
A: ссылка {
Текстовое декорация: нет;
}
#static {
Поле: 0 Авто;
Текст-альбом: слева;
}
img {
Ширина: 100%;
}
#основной {
Фон: url ("../ pic/bj_12.jpg") repet-x;
надоеволок: 5px;
}
#main span {
размер шрифта: 1,5 эм;
Цвет: #2F0075;
Полевая левая: 40px;
}
#нижний {
Ширина: 100%;
поля: 0;
Заполнение: 0;
размер шрифта: 1ем;
}
#bottom ul li {
Ширина: 48%;
Плавание: осталось;
Мяглевая маржа: -8%;
Право маржи: 10%;
тип списка: нет;
}
.sp {
маржинальная версия: -50px;
граница радий: 8px;
}
</style>
<script type = "text/javascript">
$ (function () {
// 动态加载宝贝排行信息
Функция нагрузочно -секунда () {
$ .ajax ({
Тип: "post",
Данные: "GroupId ="+$ ("#GroupId"). val (),
URL: "<%= basePath%> findbobyrankbyvote.action",
Успех: function (data) {
var list = data.list;
var row = "";
$ ("ul"). ement ();
if (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 =/" ../ pic/"+list [i] .pic+"/"> </a> <input type =/" hidden/"id =" id/"value ="+"+.
"style =/" фоновый цвет: #ffb7cd; маржинальная версия: 10px; Высота: 30px/">"+
"<img src =/" ../ pic/zan.png/"style =/" ширина: 22px; Полевая левая: 10px; Margin-Top: 5px;/"class =/" fore/">"+
"<span style =/" Margin-top: 5px; Цвет: #8A7DA9; Поплавок: верно; Право маржи: 10px;/"> 已 <pan>"+list [i] .vote+"</span> 票"+
"</span> </div> </li>";
$ (row) .appendto ($ ("ul"));
}
}
}
});
}
$ (". FAYE"). LIVE ("click", function () {
var id = $ (this) .closest ("li"). Найти ("#id"). val ();
$ .post ("<%= basepath%> updatebobyrank.action", "id =" + id,
function (data) {
if (data.msg == null) {
if (data.success == true) {
LoadSecondSort ();
}
}еще {
оповещение (data.msg);
}
});
});
window.onload = LoadSecondSort ();
});
</script>
</head>
<тело>
<input type = "hidden" id = "GroupId" value = "<%= GroupId%>">
<div id = "static">
<img src = "../ pic/top10.jpg"> <a href = "../ jsp/index.jsp"> <img
src = "../ pic/fan.png"> </a>
<div id = "main">
<pran> 近期排名: </span>
</div>
<div id = "Bottom">
<ul>
</ul>
</div>
</div>
</body>
</html>