Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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
- tomcat
- laravel
- Android
- NetBeans
- java
- 리눅스
- html
- 와일드카드
- jquery
- input
- MySQL
- File
- php
- junit
- 톰캣
- DB
- 이클립스
- CentOS
- Linux
- properties
- error
- 정규식
- Spring
- curl
- larravel
- ajax
- JSON
- 안드로이드
- SeLinux
- javascript
Archives
- Today
- Total
합쭈기 programming
Print 본문
function print(printArea)
{
console.log(printArea);
win = window.open('','','width=740,height=700');
self.focus();
win.document.open();
/*
1. div 안의 모든 태그들을 innerHTML을 사용하여 매개변수로 받는다.
2. window.open() 을 사용하여 새 팝업창을 띄운다.
3. 열린 새 팝업창에 기본 를 추가한다.
4. 안에 매개변수로 받은 printArea를 추가한다.
5. window.print() 로 인쇄
6. 인쇄 확인이 되면 팝업창은 자동으로 window.close()를 호출하여 닫힘
*/
win.document.write(' ');
win.document.write(printArea);
win.document.write('
');
win.document.close();
win.print();
win.close();
}
'Javascript' 카테고리의 다른 글
| 커스텀 데이터 속성 (0) | 2015.04.27 |
|---|---|
| validate alert으로 띄우기 (0) | 2015.04.13 |
| 정규식 숫자만 표현 (0) | 2015.04.13 |
| Modal 띄우기 (0) | 2015.04.13 |
| iframe 파일전송 (0) | 2015.04.13 |