复制代码代码如下 :
<%@ page language = "java"contenttype = "text/html; charset = utf-8"
PageEncoding = "UTF-8"%>
<%
문자열 path = request.getContextPath ();
문자열 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 = device-width, 초기 스케일 = 1.0, 최대 규모 = 1.0, 사용자-스케일 가능 = no"name = "viewport">
<title> </title>
<스타일 유형 = "텍스트/CSS">
몸 {
텍스트 정렬 : 센터;
여백 : 0 Auto;
패딩 : 0;
배경 : #ffefe5;
너비 : 100%;
}
A : 링크 {
텍스트 결정 : 없음;
}
#Static {
여백 : 0 Auto;
텍스트 정렬 : 왼쪽;
}
img {
너비 : 100%;
}
#기본 {
배경 : url ( "../ pic/bj_12.jpg") 반복 -x;
패딩 탑 : 5px;
}
#메인 스팬 {
글꼴 크기 : 1.5EM;
색상 : #2F0075;
마진 왼쪽 : 40px;
}
#맨 아래 {
너비 : 100%;
여백 : 0;
패딩 : 0;
글꼴 크기 : 1EM;
}
#bottom ul li {
너비 : 48%;
플로트 : 왼쪽;
마진 왼쪽 : -8%;
마진 오른쪽 : 10%;
목록 스타일 유형 : 없음;
}
.sp {
마진 -탑 : -50px;
Border-Radius : 8px;
}
</스타일>
<script type = "text/javaScript">
$ (function () {
// 动态加载宝贝排行信息
함수 loadsecondSort () {
$ .ajax ({
유형 : "Post",
데이터 : "groupId ="+$ ( "#groupId"). val (),
URL : "<%= basepath%> findbobyrankbyvote.action",
성공 : 기능 (데이터) {
var list = data.list;
var row = "";
$ ( "ul"). empty ();
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> <입력 유형 =/"hidden/"id =/"id/"value ="+list [i].
"스타일 =/"배경색 : #ffb7cd; 마진-탑 : 10px; 높이 : 30px/">"+
"<img src =/"../ pic/zan.png/"style =/"너비 : 22px; 마진 왼쪽 : 10px; 마진-탑 : 5px;/"class =/"favor/">"+
"<span style =/"margin-top : 5px; 색상 : #8A7DA9; 플로트 : 오른쪽; 여백 오른쪽 : 10px;/"> 已 <span>"+list [i] .vote+"</span> 票"+
"</span> </div> </li>";
$ (row) .appendto ($ ( "ul"));
}
}
}
});
}
$ ( ". pafor"). live ( "click", function () {
var id = $ (this) .Closest ( "li"). 찾기 ( "#id"). val ();
$ .post ( "<%= basepath%> updatebobyrank.action", "id =" + id,
함수 (데이터) {
if (data.msg == null) {
if (data.success == true) {
loadsecondSort ();
}
}또 다른 {
경고 (data.msg);
}
});
});
window.onload = loadsecondSort ();
});
</스크립트>
</head>
<body>
<입력 유형 = "hidden"id = "groupId"value = "<%= groupid%>">
<div id = "정적">
<img src = "../ 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>