SOURCE

console 命令行工具 X clear

                    
>
console
<!DOCTYPE html> 
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
<script>
    //生成随机验证码
var str="qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789";
var arr=str.split("");
result="";
for(i=0;i<4;i++){
    var n=Math.floor(Math.random()*arr.length);
    result+=arr[n];
}
document.write(result+"</br>");

//生成随机颜色值
function getrandomcolor(){
var r=Math.floor(Math.random()*(255+1));
var g=Math.floor(Math.random()*(255+1));
var b=Math.floor(Math.random()*(255+1));
var rgb="rgb("+r+","+g+","+b+")";
return(rgb);}

document.write(getrandomcolor());
</script>


</head>
<body>
</body>
</html>