📅  最后修改于: 2022-03-11 15:04:00.453000             🧑  作者: Mango
function generateRandomColor() {
var letters = '0123456789ABCDEF';
var color = '#';
for (var i = 0; i < 6; i++) {
color += letters[Math.floor(Math.random() * 16)];
}
return color;
}
var randomColor=generateRandomColor();//"#F10531"