复制代码代码如下:
<%@ Page Language = "Java" contentType = "text/html; charset = utf-8"
PageEncoding = "UTF-8"%>
<%
String path = request.getContextPath ();
String basalepath = request.getscheme () + ": //"
+ request.getServerName () + ":" + request.getServerport ()
+ caminho + "/";
String groupID = request.getParameter ("groupID");
%>
<! Doctype html public "-// w3c // dtd html 4.01 transitório // pt" "http://www.w3.org/tr/html4/loose.dtd">
<html>
<head>
<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 = "largura = largura do dispositivo, escala inicial = 1,0, escala máxima = 1,0, scalable = no" name = "viewport">
<Title> 宝宝排行榜 </title>
<style type = "text/css">
corpo {
Alinhamento de texto: centro;
margem: 0 automático;
preenchimento: 0;
Antecedentes: #ffefe5;
largura: 100%;
}
A: Link {
Decoração de texto: Nenhum;
}
#static {
margem: 0 automático;
Alinhamento de texto: esquerda;
}
img {
largura: 100%;
}
#principal {
Antecedentes: url ("../ pic/bj_12.jpg") repetir-x;
Top de preenchimento: 5px;
}
#Main Span {
tamanho de fonte: 1.5em;
Cor: #2F0075;
margem-esquerda: 40px;
}
#fundo {
largura: 100%;
margem: 0;
preenchimento: 0;
tamanho da fonte: 1em;
}
#bottom ul li {
largura: 48%;
flutuar: esquerda;
margem -esquerda: -8%;
Margem-direita: 10%;
Tipo no estilo de lista: nenhum;
}
.sp {
Margin -top: -50px;
Radio de fronteira: 8px;
}
</style>
<script type = "text/javascript">
$ (function () {
// 动态加载宝贝排行信息
função loadSecondSort () {
$ .ajax ({
Tipo: "post",
Dados: "groupID ="+$ ("#groupId"). val (),
URL: "<%= Basepath%> findBobyRankByvote.action",
Sucesso: função (dados) {
var lista = data.list;
var row = "";
$ ("ul"). vazio ();
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 =/"/" value = "" "+.
"style =/" cor de fundo: #ffb7cd; Margin-top: 10px; Altura: 30px/">"+
"<img src =/" ../ pic/zan.png/"style =/" width: 22px; margem-esquerda: 10px; Margin-top: 5px;/"class =/" favor/">"+
"<style span =/" margem-top: 5px; Cor: #8A7DA9; Float: Certo; Margem-direita: 10px;/"> 已 <pan>"+list [i] .vote+"</span> 票"+
"</span> </div> </li>";
$ (linha) .appendto ($ ("ul"));
}
}
}
});
}
$ (". Favor"). Live ("Click", function () {
var id = $ (this) .closest ("li"). encontre ("#id"). val ();
$ .post ("<%= bashepath%> updateBobyRank.action", "id =" + id,
função (dados) {
if (data.msg == null) {
if (data.success == true) {
loadSecondSort ();
}
}outro {
alerta (data.msg);
}
});
});
window.onload = loadSecondSort ();
});
</script>
</head>
<Body>
<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">
<pan> 近期排名: </span>
</div>
<div id = "Bottom">
<ul>
</ul>
</div>
</div>
</body>
</html>