GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Java-1/myPagesDividedWeb at master · jovi84/Java-1

Expand file tree

/

myPagesDividedWeb

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

myPagesDividedWeb

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
.settings
.settings
 
 
WebRoot
WebRoot
 
 
src
src
 
 
.classpath
.classpath
 
 
.mymetadata
.mymetadata
 
 
.project
.project
 
 
README.md
README.md
 
 
myPagesDividedWeb.zip
myPagesDividedWeb.zip
 
 

README.md

JavaWeb分页技术1

分页,是一种将所有数据分段展示给用户的技术.用户每次看到的不 是全部数据,而是其中的一部分,如果在其中没有找到自己想要的内容,用户可以通过指定页码或是点上/下一页的方式进行翻页。

本例演示静态分页,也就是先设置好每页显示10行,再根据总行数,来算出总页数,将所有页数的页号都显示出来。

相关算法(技术):

总行数(num): select count(1) from stud;

每页显示的行数(n): 固定值---已知的一个常量

页数: pageSize= num/n + (num%n==0)?0:1

当前页号: currentPage

当前要显示的页面数据的起始行号和终止行号 startN: (currentPage-1)*pageSize

如何显示从startN开始的pageSize条记录 select * from stud limit startN, pageSize;

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.