Select List Changes Background Color

[Total: 0    Average: 0/5]

This shows how to have javascript write an entire form select list.

Body Code:

<SCRIPT LANGUAGE="JavaScript">
<!--
document.write("<CENTER>");
document.write("<FORM NAME="Kolory">");
document.write("<select name="schemesel" onChange="document.bgColor = this.options[selectedIndex].value">");
document.write("<option value="FFFFFF" selected>White");
document.write("<option value="0000FF">Navy");
document.write("<option value="A0A0A0">Gray");
document.write("<option value="E9E900">Yellow");
document.write("<option value="A0A0FF">Purple");
document.write("<option value="C70000">Maroon");
document.write("<option value="FFFFA0">Brown");
document.write("<option value="F0F0FA">Silver");
document.write("<option value="FF00FF">Fuchsia");
document.write("<option value="00FFFF">Blue");
document.write("</select>");
document.write("</FORM>");
document.write("</CENTER>");
// -->
</SCRIPT>
Text Is Here

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *