In order to prevent customers from entering the full -angle (half -angle) character when entering, we need to convert it to the correct half -angle (full -angle) character through the program, which is a given function.
<%
'*******************************
'*Parameter description:
'*Str: String to be converted
'*FLAG: Mark, turn in full at 0:00, and turn to half when it is non -0
'*Return value type: string
'*******************************
FunctionDBC2SBC (Str, Flag)
dimi
iflen (str) <= 0then
Response.write (the string parameters are empty)
exitFunction
endif
Fori = 1TOLEN (STR)
str1 = ASC (MID (STR, I, 1)))
ifStr1> 0Andstr1 <= 125Andnotflagthen
DBC2SBC = DBC2SBC & CHR (ASC (MID (STR, I, 1)) -23680)
else
DBC2SBC = DBC2SBC & CHR (ASC (MID (STR, I, 1))+23680)
endif
next
Endfunction
%>