js获取随机颜色 百菲流月 2023-01-06 73 阅读1分钟 1.js获取随机颜色 function getRandomColor(){ return #${Math.floor(Math.random() * 0xffffff) .toString(16)}; } console.log(getRandomColor())