When the same form design is used to render PDF and HTML forms, the page size setting is used to paginate PDF forms, but it is ignored when an HTML form is rendered. To deal with the differences between PDF and HTML pages, form authors may optionally use page-level subforms to set up artificial HTML pages. If HTML pages are set up this way, JavaScript is needed to enable users to move from one HTML page to the next at run time.
You can use the pageUp() and pageDown() methods to enable users to move between HTML pages by using a regular command button that triggers processing when the button’s click event occurs. For both PDF and HTML forms, processing must be run at the client and server.
The pageUp() and pageDown() methods operate on page-level subforms. For example, assume that the form author has set up the following structure in the form design:
Livecycle fs designerscripting.87.7.1 How to write a script to handle HTML pages
If the user were viewing the HTML page that corresponds to Subform_Page0, calling xfa.host.pageDown() would cause Subform_Page1 to be displayed in the browser. Similarly, calling xfa.host.pageUp() while Subform_Page1 is on display would cause Subform_Page0 to be displayed in the browser. Page numbers would be assigned to the following properties to manipulate these HTML pages:
xfa.host.currentPage = 0 //moves to the first page
xfa.host.currentPage = 1 //moves to the second page
xfa.host.currentPage = 2 //moves to the third page
As users move between HTML pages, the state of the data is maintained, but the presentation state of an object (for example, the background color of a field) may change from one page to the next. You can maintain presentation settings between pages using hidden fields that contain state values for the various settings and command buttons that enable users to page back and forward through the pages of the form. Your script would update the presentation states of fields based on the values in the hidden fields. When a user clicks either of the command buttons, the calculate event for the button could be used to run the script.
See also 

How to write a script to handle HTML pages