默认生成的样式.自己可以调整.:
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(
});
|