일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 | 31 |
Tags
- Lodash
- JaCoCo
- ubuntu
- primitive type
- GIT
- Coveralls
- Linux
- Travis CI
- javascript
- nginx
- python
- {}
- API
- REST
- sinopia
- PowerMock
- sanghaklee
- 개인정보수정
- Unit-test
- AWS
- ECMAScript2015
- java
- 인프런
- dict
- RESTful
- node.js
- Gitbook
- ATOM
- NPM
- Code-coverage
Archives
- Today
- Total
목록jquery (1)
이상학의 개발블로그
[jQuery] select tag option 모든 값 가져오기
select tag의 모든 값 가져오기 Get all options values of select tag Code $('#select').find('option').map(function() {return $(this).val();}).get() // return [] $('#select option')과 같은 표현식도 가능하지만, 각 DOM 객체를 확실히 표현하기 위해 나눠서 사용했다. .get() .get() 마지막에 .get()을 하지 않으면 select tag의 모든 jQuery가 순회할 수 있는 properties를 가져온다. 따라서, 값만 가져오는 .get()을 꼭 넣어준다. Codepen See the Pen get select-box value by Sanghak,Lee (@SangHakL..
JavaScript/jQuery
2020. 1. 30. 12:39