'--------------------获取定界符---------------------
intDjfLen = 0
Do Until binArray(intDjfLen + 1) = 13
intDjfLen = intDjfLen + 1
Loop
ReDim binDjf(intDjfLen)
For i = 0 To intDjfLen
binDjf(i) = binArray(i)
Next
'---------------------------------------------------
End Sub
在webclass中使用
dim upload as new uploadfile
upload.onstartpage(request)
1、为了能用getthevalue方法正确取得input type 为checkbox,radio等的值,在
FindtheName中加入错误处理
Private Function FindTheName(nm As String) As Long
On Error GoTo FindTheNameError
'******************************参数说明*****************************
'* *
'* nm: 要寻找的 Form 元素名 *
'* 返回值: 成功—— 找到时的地址,失败—— -1 *
'* *
'*******************************************************************
'------------------定义局部变量----------------------
Dim s As Long
Dim e As Long
Dim i As Long
Dim binTmp() As Byte
Dim strName As String
'---------------------------------------------------
'------------------寻找要取得值的Form 元素名------------------------
s = 0
Do While 1
s = FindTheDjf(s)
If s <> -1 Then
s = s + intDjfLen + 41
e = s
Do While binArray(e + 1) <> 34
e = e + 1
Loop
ReDim binTmp(e - s)
For i = s To e
binTmp(i - s) = binArray(i)
Next
strName = StrConv(binTmp, 64)
If StrComp(nm, strName) = 0 Then
FindTheName = e + 1
Exit Do
End If
Else
FindTheName = -1
Exit Do
End If
Loop
'--------------------------------------------------------------
Exit Function
FindTheNameError:
FindTheName = -1
End Function
2、删除类声明中的
Private MyscriptingContext As scriptingContext定义