top of page arrow
Background Selector

Change backgrounds of container elements or the entire page with a drop-down selector and an extremely simple bit of javascript. Any valid background property will work.


The javascript:

		const mainSection = document.getElementById("mainSection");
		const changed = document.getElementById("changed");
		
		changed.onchange = changeBg;
		
		function changeBg() {
		mainSection.style.background = this.value;
		}
  	
03/11/2024