function get_hs_page(cur_page, total_page) {
var result = "";
for(var i = 1; i <= total_page; i++) {
if(i == 2 && cur_page - 6 > 1) {
i = cur_page - 6;
}else if(i == cur_page + 6 && cur_page + 6 < total_page) {
i = total_page - 1;
}else{
if(i == cur_page){
result += "<li><a style='background-color:#e7e7e7;' href='/topic?page="+i+"&type=hs'>"+i+"</a></li>";
}else{
result += "<li><a href='/topic?page="+i+"&type=hs'>"+i+"</a></li>";
}

}
}
return result;
}

相关文章:

  • 2021-06-22
  • 2021-07-21
  • 2021-05-28
  • 2021-05-15
猜你喜欢
  • 2022-12-23
  • 2021-07-21
  • 2021-08-22
  • 2022-12-23
  • 2021-12-31
  • 2021-11-09
相关资源
相似解决方案