select 박스의 속성들
페이지 정보
작성자 서방님 댓글 0건 조회 201회 작성일 06-09-12 12:33본문
select box object properties 와 methods 문법
select box의 option을 얻기 위해서는
option을 조회하기 위해서는
특성 propertyName
방법 methodName
이벤트 event handler
selectName.propertyName
selectName.methodName(parameters)
formName.elements[index].propertyName
formName.elements[index].methodName(parameters)
selectName.methodName(parameters)
formName.elements[index].propertyName
formName.elements[index].methodName(parameters)
selectName | attribute 이름 |
formName | attribute 이름 혹은 forms 배열 변수의 element |
index | select group에서 select button의 번호 정수 |
propertyName methodName parameters |
아래 목록의 특성 |
select box의 option을 얻기 위해서는
selectName.options[index1].propertyName
formName.elements[index2].options[index1].propertyName
formName.elements[index2].options[index1].propertyName
selectName | attribute 이름 |
index1 | select group에서 select button의 번호 정수 |
formName | attribute 이름 혹은 forms 배열 변수의 element |
index2 | select button의 번호 정수 |
propertyName methodName parameters |
아래 목록의 특성 |
option을 조회하기 위해서는
selectName.options
selectName.options[index]
selectName.options.length
selectName.options[index]
selectName.options.length
selectName | attribute 이름 |
index | select group에서 select button의 번호 정수 |
.length | form의 <SELECT>안에서 정의 된 selects 배열 변수의 갯수 |
특성 propertyName
.length | select object의 option 배열 변수의 갯수 |
.name | select object의 이름 |
.options | 아래표 참조 |
.selectedIndex | 복수 option 중 선택 된 option의 index 번호 |
options 배열 변수 의 property | |
.defaultselected | 복수 option 중 초기 선택 된 option의 index 번호 |
.index | 복수 option 중 option의 정수 번호 |
.length | select box의 option 배열 변수의 갯수 |
.name | select box의 이름 |
.selected | 복수 option 중 선택 된 option |
.selectedIndex | 복수 option 중 선택 된 option의 index 번호 |
.text | 나타나는 텍스트 |
.value | 표면에 나타나는 표시 |
방법 methodName
.blur() | select box에서 초점을 지움(다른 곳으로) |
.focus() | select box에 초점을 줌(그 곳으로) |
이벤트 event handler
onBlur | select box에서 초점을 다른 곳으로 이동 |
onChange | select box에서 선택을 바꿈 |
onFocus | select box에서 초점을 그 곳으로 이동 |
설명
<FORM>...<SELECT>...</SELECT>...</FORM>하면 selection box가 생성 된다.
<option> option in the <SELECT> 안의 options 배열변수에서 option 번호로 을 선택 할 수 있다.
<option> option in the <SELECT> 안의 options 배열변수에서 option 번호로 을 선택 할 수 있다.
첫번 것은 .options[0] 임 options 배열 변수의 element가 각 option를 대표하지 만 options[index]의
값은 항상 null 이다.
selectName.options으로 return 된 값은 있지 만 이것은 전체 HTML을 대표 하기 때문에 option 사항으로
사용 될수 없다.
댓글목록
등록된 댓글이 없습니다.