在线演示代码:
js随机颜色 document.writeln('#'+('00000'+(Math.random()*0x1000000<<0).toString(16)).slice(-6)); script> [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]