자바스크립트 select 셀렉트 박스 선택한 값을 받아오기
웹프로그램ff.bg.options[bg_frm.bg.selectedIndex].value;
ff -> 폼 이름
bg -> 셀렉트박스 이름
<script>
function bg_preview() {
var ff = document.bg_frm;
var url = ff.bg.options[bg_frm.bg.selectedIndex].value;
alert(url);
}
</script>
<from name="bg_frm">
<select name="bg" id="bg">
<option value="1">1</option>
<option value="2">2</option>
</select>
</form>
댓글을 달아 주세요