드롭다운 메뉴 중 선택한 항목 보여주기
#select.html
<select id="test">
<option>test1</option>
<option>test2</option>
<option>test3</option>
<option>test4</option>
</select>
<script>
var test = document.getElementById("test");
test.onchange = function() {
alert(test.value);
}
</script>
'JavaScript' 카테고리의 다른 글
단계가 있는 회원가입 (0) | 2020.10.26 |
---|---|
단계가 있는 회원가입(참고(1)) (0) | 2020.10.25 |
07_이벤트(4) (0) | 2020.10.25 |
07_이벤트(3) (0) | 2020.10.25 |
07_이벤트(2) (0) | 2020.10.25 |