How can I change the class of a div(myBox) from a select form using JavaScript?
<html>
<head>
<style type="text/css">
.red {background:#FF0000;color:#FFF}
.white {background:#FFF;color:#000}
.blue {background:#0000FF;color:#FFF}
</style>
</head>
<body>
<form id="myform" action="#">
<select id="bgcolor">
<option value="red">Red</option>
<option value="white">White</option>
<option value="blue">Blue</option>
</select>
</form>
<div id="myBox" class="red">This is myBox</div>
</body>
</html>