SOURCE

document.write(Math.floor(110.827)+"<br/>");
document.write("生成随机验证码<br/>");
function getYZM(length){
var strValue="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
var code="";
for(var i=0;i<length;++i){
var randomIndex=Math.floor(Math.random()*strValue.length);
code+=strValue.charAt(randomIndex);
}
return code;
}
document.write(getYZM(6)+"<br/>");
document.write(getYZM(7)+"<br/>");
document.write(getYZM(8)+"<br/>");
console 命令行工具 X clear

                    
>
console