javascript
//смена цвета шара
ball.onclick = function() {
let x = Math.floor(Math.random() * 255);
let y = Math.floor(Math.random() * 255);
let z = Math.floor(Math.random() * 255);
ball.style.backgroundColor = "rgb(" + x + ", " + y + ", " + z + ")";
}
|