I have the following Function:
Function getNext10(num)
pageLen = len(num)
If pageLen = 1 Then
next10 = 10
ElseIf pageLen>1 Then
pageRem = 10
pageTen = right(num, 1)
next10 = num + pageRem - pageTen
End If
getNext10 = next10
End Function
If I use that function I get the following Error:
Microsoft VBScript compilation "800a03f4'
'If' expected
/display/paging.asp, row 27
End Function
------^
What is wrong with that function?
Try this:
Function getNext10(num)
pageLen = len(num)
If pageLen = 1 Then
next10 = 10
End If
If pageLen>1 Then
pageRem = 10
pageTen = right(num, 1)
next10 = num + pageRem - pageTen
End If
getNext10 = next10
End Function
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.