js随机生成颜色代码

function generyRandomColor() {
return '#' + ('00000' + (Math.random() * 0x1000000 << 0).toString(16)).slice(-6);
}

posted @ 2016-05-30 12:47  潇潇与偕  阅读(549)  评论(0编辑  收藏  举报