level 1
封装一个JS函数,调用之后可以将任意某个元素的背景色改为任意色
2020年04月26日 15点04分
1
level 6
考察随机数的运用,仅供参考
function randomColor({
let r =Math.floor(Math.random()*255);
let g = Math.floor(Math.random()*255);
let b = Math.floor(Math.random()*255);
return 'rgb('+r+','+g+','+b+')';
}
2020年04月29日 14点04分
5