📜  随机光色 js - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:46.129000             🧑  作者: Mango

代码示例1
function getRandomColor() {
                var letters = 'BCDEF'.split('');
                var color = '#';
                for (var i = 0; i < 6; i++ ) {
                    color += letters[Math.floor(Math.random() * letters.length)];
                }
                return color;
            }