select option들 중에 원하는 option에 selected 속성을 넣어주는 방법 입니다.
var target = document.getElementById('selectList'); //대상 셀렉트 id
target.options[idx].selected = true; //options에 대상 option의 index를 넣으시면 됩니다.
[javascript] jQuery와 prototype 충돌 오류해결 (0) | 2013.07.09 |
---|---|
[javascript] 자바스크립트로 첨부파일 확장자 체크 (8) | 2013.05.07 |
[javascript] 쿠키 생성, 삭제 (1) | 2013.04.15 |
[javascript] 크롬에서 window.open의 fullscreen (3) | 2013.03.12 |
[API] 네이버 지도 API 사용방법(웹용) (2) | 2013.03.07 |
댓글 영역