SOURCE

function writeDocument(variable) {
    document.write(variable + "<br/>");
} 

writeDocument("最大值"+Math.max(0,7,5,9));
writeDocument("最小值"+Math.min(0,7,5,9));

writeDocument("随机验证码------------------");
function yzm(length){
    var strnumber="0123456789abcdefghijklmnopqrstuvwxyz";
    var code="";
    for(var i=0;i<length;++i){
        var randonNumber=Math.floor(Math.random()*strnumber.length);
        code=code+strnumber.charAt(randonNumber);
    }
    return code;
}
writeDocument(yzm(4));
writeDocument(yzm(5));

writeDocument("生成随机的颜色 rgb(255, 255, 255)----------------") 
function rgb() {
    var r = Math.floor(Math.random() * 256);
    var b = Math.floor(Math.random() * 256);
    var g = Math.floor(Math.random() * 256);
    writeDocument("rgb("+ r + "," + b + "," + g + ")");
}
rgb();
console 命令行工具 X clear

                    
>
console