링크 미디어 속성
예시
링크 요소가 의도한 미디어 유형을 반환합니다.
var x = document.getElementById("myLink").media;
정의 및 사용
미디어 속성은 링크 요소의 미디어 유형을 설정하거나 반환합니다.
미디어 유형은 스타일 정보에 중요합니다. 스타일은 컴퓨터와 모바일 장치에 따라 다를 수 있습니다.
브라우저 지원
Property | |||||
---|---|---|---|---|---|
media | Yes | Yes | Yes | Yes | Yes |
통사론
미디어 속성을 반환합니다.
linkObject.media
미디어 속성을 설정합니다.
linkObject.media = device
속성 값
Value | Description |
---|---|
all | For all devices. This is default |
aural | For speech synthesizers |
braille | For Braille tactile feedback devices |
embossed | For paged Braille printers |
handheld | For handheld devices |
For printed pages and print preview | |
projection | For projectors or transparencies |
screen | For color computer screens |
speech | For speech synthesizers |
tty | For teletype devices |
tv | For TV-type devices |
기술적 세부 사항
반환 값: | 쉼표로 구분된 미디어 유형 목록을 나타내는 문자열 |
---|
더 많은 예
예시
미디어 유형 변경:
document.getElementById("myLink").media = "all";
관련 페이지
HTML 참조: HTML <link> 미디어 속성
❮ 링크 개체