DELPHI生成随机字符串var SourceStr,str:string; i:integer;begin SourceStr:='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; randomize; for i:=1 to 16 do str:=str+sourcestr[Random(62)+1]; ShowMessage(str);end;[注:生成长度为16位数,取值范围为'A-Z'a-z''0-9'的随机数]http://www.delphitop.com/html/zifuchuan/2366.html