javascript全角半角转换
Function strConv(strCommix,intState)
Dim strChar
Dim intAsc
Dim strTmp
If intState = 0 Then
For i = 1 To Len(strCommix)
strChar = Mid(str1, i, 1)
intAsc = Asc(strChar)
If (intAsc>=-23648 And intAsc<=-23553) Then
strTmp = strTmp & Chr(intAsc+23680)
Else
strTmp = strTmp & strChar
End if
Next
Else
For i = 1 To Len(strCommix)
strChar = Mid(str1, i, 1)
intAsc = Asc(strChar)
If (intAsc>=32 And intAsc<=127) Then
strTmp = strTmp & Chr(intAsc-23680)
Else
strTmp = strTmp & strChar
End if
Next
End If
strConv = Trim(strTmp)
End Function
Dim strChar
Dim intAsc
Dim strTmp
If intState = 0 Then
For i = 1 To Len(strCommix)
strChar = Mid(str1, i, 1)
intAsc = Asc(strChar)
If (intAsc>=-23648 And intAsc<=-23553) Then
strTmp = strTmp & Chr(intAsc+23680)
Else
strTmp = strTmp & strChar
End if
Next
Else
For i = 1 To Len(strCommix)
strChar = Mid(str1, i, 1)
intAsc = Asc(strChar)
If (intAsc>=32 And intAsc<=127) Then
strTmp = strTmp & Chr(intAsc-23680)
Else
strTmp = strTmp & strChar
End if
Next
End If
strConv = Trim(strTmp)
End Function
浙公网安备 33010602011771号