Today, someone wants this code. Someone will post a VB, and the map is easily rewritten into VBS, and canceled the judgment of 1900, I hope that the original VB author should not be able to see.
As follows: <% @ language = "vbscript" CODEPAGE = "936"%> <% Function Getnewidcard (IDCARD) DIM i, S, Wi, WF, Result Wi = Split ("7, 9, 10, 5, 8, 4 , 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2 ",", ", - 1, 1) WF = Split (" 1, 0, X, 9, 8, 7, 6, 5, 4, 3, 2 ",", ", - 1, 1) IDCARD = MID (IDCard, 1, 6) &" 19 "& MID (IDCard, 7, 9) s = 0 for i = 0 To Ubound (Wi) S = CINT (Wi (i)) * CINT (MID (IDCard, i 1, 1)) s next getnewidcard = IDCARD & WF (S MOD 11) End Function
IDCARD = Request ("IDCARD") if idcard <> EMPTY THENNEWIDCARD = GetneWidCard (IDCARD) Response.write (newidcard) end if%>