let one = document.getElementById("one"); let two = document.getElementById("two"); let three = document.getElementById("three"); let four = document.getElementById("four"); let six = document.getElementById("six"); let seven = document.getElementById("seven"); let eight = document.getElementById("eight"); let nine = document.getElementById("nine"); one.onclick = function(){ one.style.backgroundColor = "red"; }; two.ondblclick = function(){ two.style.backgroundColor = "green"; }; three.onmouseenter = function(){ three.style.backgroundColor = "yellow"; }; four.onmouseleave = function(){ four.style.backgroundColor="blue"; }; five.onmousedown = function(){ five.style.backgroundColor = "orange"; }; six.onmouseup = function(){ six.style.backgroundColor="pink"; }; seven.onmousemove = function(){ seven.style.backgroundColor == "red" ? seven.style.backgroundColor = "green" : seven.style.backgroundColor = "red"; }; eight.onwheel = function(){ eight.style.backgroundColor == "yellow" ? eight.style.backgroundColor = "magenta" : eight.style.backgroundColor = "yellow"; }; // wymiary okna w nine function onResizeFun(){ let w = window.outerWidth; let h = window.outerHeight; nine.innerHTML = w + "x" + h; } login.onfocus = function(){ login.style.backgroundColor="aqua"; }; password.onblur = function(){ password.style.backgroundColor="aquamarine"; }