##########javascript 版##############
function randomChar(l) {
var x="123456789poiuytrewqasdfghjklmnbvcxzQWERTYUIPLKJHGFDSAZXCVBNM ";
var tmp="";
for(var i=0;i< l;i++) {
tmp += x.charAt(Math.ceil(Math.random()*100000000)%x.length);
}
tmp를 반환합니다.
}
var str = randomChar(20);
document.write(str.toUpperCase());
##########php版##############
함수randomChar($len ){
if($len<1) return;
$str='';
$ss = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
for($i=0;$i<$len;$i++){
$n = rand(0,35);
$str .= $ss[$n];
}
$str을 반환합니다.
}