function foo() {
var colors = ["white", "red", "blue", "green"];
var color = document.getElementById("select").value;
var selection = document.getElementById("select").selectedIndex;
document.getElementById("p").innerHTML = "Your favorite color is: " + color;
document.body.style.background = colors[selection];
}
//This should work
Frontend Development
Stupid JS problem (still learning this)
Submitted by AAA, 10-06-2016, 09:33 PM, Thread ID: 21709
Thread Closed
RE: Stupid JS problem (still learning this) 10-06-2016, 10:59 PM #2 Do notdispatchsuperfluousmemos to me
Contactme only ifyou are faced withgenuine conflictor ifyou are opposed to speaking with another
Act with forethoughtpriorto speakingor acting as I am not fond offorgiveness
10-06-2016, 10:59 PM
#2 Contactme only ifyou are faced withgenuine conflictor ifyou are opposed to speaking with another
Act with forethoughtpriorto speakingor acting as I am not fond offorgiveness