글수 22
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> 연습용 </TITLE>
</HEAD>
<script>
function ff(){
//alert(fontColor.selectedIndex);
//alert(fontColor.options[1].value);
alert(fontColor.options[fontColor.selectedIndex].value);
document.bgColor =fontColor.options[fontColor.selectedIndex].value;
}
</script>
<BODY>
<input type=button value='클릭' onclick="ff();">
<select id="fontColor">
<option value="red" >빨강</option>
<option value="green">녹색</option>
<option value="blue">파랑</option>
</select>
</BODY>
</HTML>


