tts.html:24 Uncaught TypeError: Cannot set property 'backgroundColor' of undefined
at tts.html:24
<script>
window.onload = function() {
var top = document.querySelector(".top");
top.style.backgroundColor = "red";
top.style.width = "500px";
top.style.height = "600px";
}
</script>