티스토리 뷰
var htmlImageElement = new Image(width, height);
- Image() 생성자는 새 HTMLImageElement 인스턴스를 만든다.
- document.createElement ('img')와 기능적으로 동일하다.
- width, height 값은 생략 가능하다.
- 값을 하나만 작성하면, width 값이 되고, height 값은 auto가 된다.
See the Pen [JS] image() by mill (@millfeel) on CodePen.
[공부 좌표]
'이론 > JS' 카테고리의 다른 글
[JS] 배열의 추가, 삭제 (0) | 2021.02.08 |
---|---|
[JS] DOM의 Node 생성, 삽입, 삭제 (0) | 2021.02.08 |
[JS] 함수 - 전역 변수, 지역 변수 (0) | 2021.02.05 |
[JS] 연산 속도 체크 - Console.time() / Console.timeEnd() (0) | 2021.02.02 |
[JS] 숫자형 - parseInt / parseFloat (0) | 2021.02.01 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- innerHeight
- constructor
- clinetTop
- offsetTop
- clientHeight
- @font-face
- 링크막기 #a링크막기
- 불일치 연산자
- 동치 연산자
- 대괄포 표기법
- 부등 연산자
- 동등 연산자
- javascript class
- outerHeight
- [[Prototype]]
- scrollTop
- prototype 프로퍼티
- __proto__
- 객체의 프로퍼티
- scrollHeight
- 프로퍼티
- offsetHeight
- property
- 일치 연산자
- 점 표기법
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함