# GetCurrentPageIndex

Use the GetCurrentPageIndex method to get the current page index. Learn its syntax and parameters in documentation.

## Content

Gets the current page index.

## Syntax

[JavaScript]

```javascript
var ret = FpSpread1.GetCurrentPageIndex();
```

## Parameters

None

## Return Type

Integer, index of the current page

## Remarks

This method returns the page index of the page that is currently displayed. A page contains the number of rows specified by the **PageSize** property.

## Example

This is a sample that contains the method. On the client side, the script that contains the method would look like this:

```javascript
<script type="text/javascript">
   function getHValue() {
       var ss=document.getElementById("FpSpread1");
       var totalRow = ss.GetCurrentPageIndex();
   }
</script>
```

## See Also

[GetTotalRowCount](/spreadnet/docs/latest/online-asp/overview/spweb-clientscriptref/clientscript-members/clientscript-allmeths/CSSR-GetTotalRowCount)
[SetValue](/spreadnet/docs/latest/online-asp/overview/spweb-clientscriptref/clientscript-members/clientscript-allmeths/CSSR-SetValue)
[Scripting Members](/spreadnet/docs/latest/online-asp/overview/spweb-clientscriptref/clientscript-members)