특정 영역 팝업후 프린트 하기 > 소스코드

본문 바로가기
사이트 내 전체검색


회원로그인

소스코드

javascript | 특정 영역 팝업후 프린트 하기

페이지 정보

작성자 100K5 작성일12-04-01 09:57 조회59,793회 댓글0건

본문

<script type="text/javascript">
<!--
function pagePrint(obj) {
 var w = obj.offsetWidth;
 var h = obj.offsetHeight;
 
 var features = "menubar=no, toolbar=no, location=no, directoreis=no, status=no, scrollbar=yes, resizable=yes, width=" + w + ", height=" + h + ", left=0, top=0";
 var PrintPage = window.open("about:blank", obj.id, features);

 PrintPage.document.open();
 PrintPage.document.write("<html><head><title></title><link type='text/css' rel='stylesheet' href='../common/css/import.css'/><style type='text/css'>body{background::}</style>\n<head>\n<body>" + obj.innerHTML + "\n</body></html>");

 PrintPage.document.close();

 PrintPage.document.title = document.domain;
 PrintPage.print(PrintPage.location.reload());
}
//-->
</script>
소스
 
<!-- 이벤트 핸들러 -->
onclick="pagePrint(document.getElementById('print_page'))"

댓글목록

등록된 댓글이 없습니다.


사이트소개 개인정보취급방침 서비스이용약관 Copyright © kkujunhee.net All rights reserved.
상단으로

개인정보관리책임자 : 관리자

모바일 버전으로 보기