<html>
<head>
<title></title>
<script type="text/javascript">
function seeColor(form) {
var newColor = (form.colorsList.options[form.colorsList.selectedIndex].value);
document.bgColor = newColor;
}
</script>
</head>
<body>
<form>
<select name="colorsList">
<option selected="selected" value="A">A</option>
<option value="B">B</option>
<option value="C">C</option>
<option value="D">D</option>
</select>
<input type="button" value="Change It" onclick="seeColor(this.form)" />
</form>
</body>
</html>
|