일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 가상서버호스팅
- 워드프레스
- proxmox
- html/css
- KB국민카드
- 리눅스
- 램가스초월
- php
- Ajax
- 아파치
- 시놀로지
- Apache
- 킹북이초월
- 티스토리
- SKT
- centos
- jQuery
- 알뜰폰
- KB증권
- 자바스크립트
- 윈도우10
- 복현오거리
- 소비전력
- ConoHa
- 보르비스초월
- iptime
- 알리익스프레스
- 스톤에이지
- mysql
- 거제도
- Today
- Total
목록matchMedia (1)
맛집 여행 캠핑 일상 생활
자바스크립트 프린터 출력 이벤트 알아내기
자바스크립트 프린터 출력 이벤트 알아내기 javascript 로 인쇄의 시작과 종료를 catch 하는 방법니다. if(window.matchMedia) {var mediaQueryList = window.matchMedia('print');mediaQueryList.addListener(function(mql){if (mql.matches) {beforePrint();} else {afterPrint();}});}window.onbeforeprint = beforePrint;window.onafterprint = afterPrint;function beforePrint() {alert('인쇄를 시작전 입니다.');}function afterPrint() {alert('인쇄가 완료되었습니다.');}
JAVASCRIPT
2017. 4. 19. 16:08