Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- mariadb
- yum
- MySQL
- JavaScript
- 한글 깨짐
- php
- 확장자
- TextBox
- random
- replace
- centos
- docker
- 천단위
- Oracle
- SVN
- 일괄변경
- smarty
- ubuntu
- 문자열자르기
- Postfix
- TPL
- jQuery
- 부모창
- Eclipse
- Selectbox
- install
- RabbitMQ
- Python
- i18n
Archives
- Today
- Total
목록Selectbox (4)
wilson's story
javascript selectbox selected
// selectbox selected for (i = 0; i < document.getElementById("test").options.length; i++) { if (document.getElementById("test").options[i].value == "비교값이 들어감") { document.getElementById("test").options[i].selected = "selected"; } }
Javascript
2009. 7. 13. 17:03
javascript selectbox option의 이름 추출하기
방법은 2가지가 있다.. 각자 맞는 스타일로 작성하면 된다. //--- 방법: 1 --------------------- for (m = 0; m < pointFileSplit.length; m++) { var pointCount = m.toString(10); var optionID = "opt" + pointCount; var optionCheck = document.getElementById (optionID); if (optionCheck.selected == true) { //option을 선택하면 true var selectValue = optionCheck.value; var selectText = optionCheck.text; } } //--- 방법: 2 ------------------..
Javascript
2009. 7. 11. 14:52