简体   繁体   English

出现VBSCRIPT错误:“ 800a03f4”

[英]Getting VBSCRIPT Error: “800a03f4”

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' Microsoft VBScript编译“ 800a03f4”

'If' expected 如果“预期”

/display/paging.asp, row 27 /display/paging.asp,第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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM