这里分享一个不错的js分页代码
代码中cpage是页面计数,应为全局变量,可以随处调用它;
totalpage是总页数。
与asp分页代码很类似,也是先取得记录总数,然后实现分页,基本的分页思路与原理还是相通的,感兴趣的朋友做个参考吧。
例子,js分页效果代码。
<!doctype html public "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" lang="gb2312"> 
<head> 
<title>JS静态分页程序--www.jbxue.com</title> 
</head> 
<style type="text/css"> 
a:link,a:visited,a:hover,.current,#info{ 
    border:1px solid #DDD; 
    background:#F2F2F2; 
    display:inline-block; 
    margin:1px; 
    text-decoration:none; 
    font-size:12px; 
    width:15px; 
    height:15px; 
    text-align:center; 
    line-height:15px; 
    color:#AAA; 
    padding:1px 2px; 

a:hover{ 
    border:1px solid #E5E5E5; 
    background:#F9F9F9; 

.current{ 
    border:1px solid #83E7E4; 
    background:#DFF9F8; 
    margin:1px; 
    color:#27CBC7; 

#info{ 
    width:auto; 

</style> 
<body> 
<div >
</script> 
</body> 
</html>

您可能感兴趣的文章:

相关文章:

  • 2021-06-18
  • 2021-09-28
  • 2022-12-23
  • 2021-10-27
  • 2021-12-19
  • 2021-09-24
  • 2022-12-23
  • 2021-08-17
猜你喜欢
  • 2021-11-29
  • 2021-08-30
  • 2021-09-12
  • 2022-12-23
  • 2022-01-14
  • 2022-12-23
相关资源
相似解决方案