How to change the background color of a DIV from a dropdown menu?
问题 Is it possible to change the background color of a DIV based on the end-user's selection from a drop down list? For example, I have a drop down menu with options for blue, green, red, etc. and I would like the DIV background color to be whatever the user selects. Here is what i tried but I cannot figure out how to get it it work: <head> <style> div.results{ position: relative; left: 300px; height: 200px; width: 200px; border: 1px solid; color: black; } </style> <script>// this script will