复制代码代码如下:
<% @ Page Language = "Java" ContentType = "Text / Html; Charset = UTF-8"
Pageencoding = "UTF-8"%>
<%
String path = request.getContextPath ();
String basepath = request.getscheme () + ": //"
+ request.getServerName () + ":" + request.getServerport ()
+ chemin + "/";
String GroupID = request.getParameter ("GroupId");
%>
<! Doctype html public "- // w3c // dtd html 4.01 transitional // en" "http://www.w3.org/tr/html4/loose.dtd">
<html>
<adal>
<meta http-equiv = "contenu-type" contenu = "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 = device-width, initial-scale = 1,0, maximum-scale = 1.0, user-échec = no" name = "vision">
<Title> 宝宝排行榜 </TITAL>
<style type = "text / css">
corps {
Texte-aligne: Centre;
marge: 0 auto;
rembourrage: 0;
Contexte: # fFEFE5;
Largeur: 100%;
}
a: lien {
Décoration du texte: aucune;
}
#Static {
marge: 0 auto;
Texte-aligne: gauche;
}
img {
Largeur: 100%;
}
#principal {
Contexte: url ("../ pic / bj_12.jpg") répéter-x;
Tableau de rembourrage: 5px;
}
#Main Span {
taille de police: 1.5EM;
Couleur: # 2F0075;
marge-gauche: 40px;
}
#bas {
Largeur: 100%;
marge: 0;
rembourrage: 0;
taille de police: 1em;
}
#bottom ul li {
Largeur: 48%;
flottant: à gauche;
marge-gauche: -8%;
marge droite: 10%;
Type de style liste: aucun;
}
.sp {
marge: -50px;
Border-Radius: 8px;
}
</ style>
<script type = "text / javascript">
$ (function () {
// 动态加载宝贝排行信息
fonction chargeseConDSort () {
$ .ajax ({
Type: "Post",
Données: "GroupID =" + $ ("# GroupID"). Val (),
URL: "<% = basepath%> findbobyrankbyvote.action",
Succès: fonction (données) {
var list = data.list;
var row = "";
$ ("ul"). vide ();
if (list! = null && list.length! = 0) {
pour (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> <entrée type = /" Hidden / "id = /" id / "value =" + list [i] .id + "> <v class =" "" + "+" + ".
"Style = /" Background-Color: # ffb7cd; marge: 10px; hauteur: 30px / ">" +
"<img src = /" ../ pic / zan.png / "style = /" width: 22px; marge-gauche: 10px; marge-top: 5px; / "class = /" favori / ">" +
"<span style = /" marge: 5px; Couleur: # 8A7DA9; flottant: à droite; marge-droite: 10px; / "> 已 <span>" + liste [i] .vote + "</span> 票" +
"</span> </div> </li>";
$ (row) .appendto ($ ("ul"));
}
}
}
});
}
$ (". favori"). live ("cliquez", fonction () {
var id = $ (this) .closest ("li"). trouver ("# id"). val ();
$ .post ("<% = basepath%> updatebobyrank.action", "id =" + id,
fonction (data) {
if (data.msg == null) {
if (data.success == true) {
LoadSeconDSort ();
}
}autre {
alert (data.msg);
}
});
});
window.onLoad = loshSecondsort ();
});
</cript>
</ head>
<body>
<input type = "Hidden" id = "groupId" value = "<% = groupId%>">
<div id = "statique">
<img src = "../ pic / top10.jpg"> <a href = "../ jsp / index.jsp"> <img
src = "../ pic / fan.png"> </a>
<div id = "main">
<span> 近期排名: </span>
</div>
<div id = "inférieur">
<ul>
</ul>
</div>
</div>
</docy>
</html>