复制代码代码如下::
<%@ page Language = "java" contentType = "text/html; charset = utf-8"
pageCoding = "utf-8"%>
<%
String path = request.getContextPath ();
String basepath = request.getscheme () + ": //"
+ request.getServerName () + ":" + request.getServerport ()
+ Pfad + "/";
String GroupId = Request.GetParameter ("GroupID");
%>
<! DocType html public "-// w3c // dtd html 4.01 transitional // en" "http://www.w3.org/tr/html4/loose.dtd">
<html>
<kopf>
<meta http-äquiv = "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 = Gerätebreite, initiale scale = 1,0, maximal scale = 1.0, user-scalable = no" name = "viewPort">
<title> 宝宝排行榜 </title>
<style type = "text/css">
Körper {
Text-Align: Mitte;
Rand: 0 Auto;
Polsterung: 0;
Hintergrund: #ffefe5;
Breite: 100%;
}
A: Link {
Textdekoration: Keine;
}
#static {
Rand: 0 Auto;
Text-Align: links;
}
img {
Breite: 100%;
}
#hauptsächlich {
Hintergrund: URL ("../ PIC/BJ_12.JPG") repep-x;
Padding-Top: 5px;
}
#Mainspan {
Schriftgröße: 1,5EM;
Farbe: #2F0075;
Rand-Links: 40px;
}
#unten {
Breite: 100%;
Rand: 0;
Polsterung: 0;
Schriftgröße: 1EM;
}
#bottom ul li {
Breite: 48%;
float: links;
Margin -Links: -8%;
Marge-Right: 10%;
Typ-Typ-Typ: Keine;
}
.sp {
Rand: -50px;
Border-Radius: 8px;
}
</style>
<script type = "text/javaScript">
$ (function () {
// 动态加载宝贝排行信息
Funktion loadsecondsort () {
$ .ajax ({{{
Typ: "Post",
Daten: "Groupid ="+$ ("#Groupid"). Val (),
URL: "<%= Basepath%> findBobyrankByVote.Action",
Erfolg: Funktion (Daten) {
var list = data.list;
var row = "";
$ ("ul"). leer ();
if (list! = null && list.length! = 0) {
für (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> <Eingabetyp =/" Hidden/"id =/" id/"value ="+list [i].
"style =/" Hintergrundfarbe: #ffb7cd; Rand: 10px; Höhe: 30px/">"+
"<img src =/" ../ pic/zan.png/"style =/" width: 22px; Rand-Links: 10px; Rand: 5px;/"class =/" favor/">"+
"<span style =/" Margin-Top: 5px; Farbe: #8a7da9; float: rechts; Margin-Right: 10px;/"> 已 <span>"+Liste [i] .Vote+"</span> 票"+
"</span> </div> </li>";
$ (Reihe) .AppendTo ($ ("ul"));
}
}
}
});
}
$ (". favor"). Live ("Click", function () {
var id = $ (this) .closest ("li"). find ("#id"). val ();
$ .post ("<%= Basepath%> updateBobyrank.Action", "id =" + id,
Funktion (Daten) {
if (data.msg == null) {
if (data.success == true) {
loadsecondsort ();
}
}anders {
alert (data.msg);
}
});
});
window.onload = loadsecondSort ();
});
</script>
</head>
<body>
<Eingabe 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">
<span> 近期排名: </span>
</div>
<div id = "boden">
<ul>
</ul>
</div>
</div>
</body>
</html>