function writeDocument(variable) {
document.write(variable + "<br/>");
}
writeDocument("最大值最小值------------------------------");
writeDocument("最大值:" + Math.max(1,3,9,6,44));
writeDocument("最小值:" + Math.min(1,3,9,6,44));
writeDocument("生成随机码------------------------------");
function generateVerifyCode(length){
var strLetterNumber = "46845316841GYFJVJFYB";
var code = "";
for(var i = 0; i< length ; ++i){
var randomNumber = Math.floor(Math.random()*strLetterNumber.length);
code = code+ strLetterNumber.charAt(randomNumber);
}
return code;
}
writeDocument(generateVerifyCode(4));
writeDocument("生成随机颜色----------------------");
function generateVerifyCode(length){
var red = Math.floor(Math.random()*256);
var green = Math.floor(Math.random()*256);
var blue = Math.floor(Math.random()*256);
writeDocument("rgb(" + red + ","+ green +","+ blue +")");
}
generteRandomColor();
console