默认生成的样式.自己可以调整.:
1
2
3
|
<
table
id
=
"commentTab"
width
"100%;"
>
</
table
>
div
"meneameFy"
></
div
>
|
functionpageInit(s){
currsPage=s;//当前页码(注意是传过来的)
if(currsPage==
1
){
strSpan=
"<spanclass='disabled'><</span>"
;
}else{
"<ahref='javascript:Page(1);'><</a>"
;
}
for(varj=totalPage;j>
0
;j--){
varbb=totalPage-j+
;
if(bb==currsPage){
strSpan=strSpan+
"<spanclass='current'>"
+bb+
"</span>"
;
}else{
"<ahref='javascript:Page("
");'>"
"</a>"
;
}
if(bb==totalPage){
break;
}
}
if(currsPage==totalPage){
"<spanclass='disabled'>></span>"
;
}else{
+totalPage+
");'>></a>"
;
}
){
;
currsPageYM=grountCount;
}else{
;
}
for(vark=grountCount;k>
;k--){
varbb=totalPage-k+
;
if(bb==currsPage){
;
}else{
;
}
if(bb==totalPage){
break;
}
}
if(currsPage==totalPage){
;
}else{
;
}
){
;
currsPageYM=grountCount;
}else{
;
}
for(vari=grountCount;i>
;i--){
varbb=currsPageYM-i+
;
if(bb==currsPage){
;
}else{
;
}
if(bb==totalPage){
break;
}
}
if(currsPage==totalPage){
;
}else{
;
}
}
document.getElementById(
"meneameFy"
).innerHTML=strSpan;
}
functionPage(s){
jQuery(
"#commentTabtr"
).remove();
jQuery.post(
"getAllCommentProduct.action"
,{prodId:
"${id}"
for(vari=
;i<data.rows.length;i++){
vaRSS=
+
"<trclass='capti'>"
"<th>评论内容:</th><td><divstyle='height:100px;width:800px;border:1pxsolidpink;'>"
+data.rows[i].content+
"</div><divstyle='float:right;'>"
+data.rows[i].createTime+
"</div></td>"
"</tr>"
;
jQuery(ss).appendTo(commentTab);
}
},
"json"
);
}
//页面初始化加载
jQuery(function(){
<%
Stringid=request.getParameter(
"id"
);
request.setAttribute(
});
|
//默认样式,不喜欢可以修改
<style>
div#meneameFy{
margin
:
10px
150px
;}
div#meneameFyA{
BORDER-RIGHT:
#ff9600
1px
solid
;PADDING-RIGHT:
7px
;BACKGROUND-POSITION:
50%
bottom
;BORDER-TOP:
;PADDING-LEFT:
;BACKGROUND-IMAGE:
url
(meneame.jpg);PADDING-BOTTOM:
5px
;BORDER-LEFT:
;COLOR:
#ff6500
;MARGIN-RIGHT:
3px
;PADDING-TOP:
;BORDER-BOTTOM:
;TEXT-DECORATION:
none
}
div#meneameFyA:hover{
none
;BACKGROUND-COLOR:
#ffc794
}
div#meneameFyA:active{
#ffc794
}
div#meneameFySPAN.current{
#ff6500
;FONT-WEIGHT:
bold
;PADDING-BOTTOM:
#ffbe94
}
div#meneameFySPAN.disabled{
#ffe3c6
#ffe3c6
solid
}
</style>
|