0
CallPrint 기능에 헤더를 추가하는 방법 :자바 스크립트 - 나는 자바 스크립트 함수가
<script type="text/javascript">
function CallPrint(strid) {
var prtContent = document.getElementById(strid);
var WinPrint = window.open('', '', 'left=0, top=0, width=970, height=500, toolbar=0, scrollbars=0, status=0');
WinPrint.document.write(prtContent.innerHTML);
WinPrint.document.close();
WinPrint.focus();
WinPrint.print();
WinPrint.close();
}
</script>
을하고 버튼의 : 지금 작동하고 나는 페이지의 특정 부분을 인쇄 할 수 있지만,
onClick="javascript:CallPrint('printarea')"
로고가있는 헤더와 페이지 인쇄시 표시되는 연락처 정보를 추가하고 싶습니다.
나는 그것을 작동하게 만들 수 없다. 새 스타일 추가 = "print"내 CSS 코드로 페이지에 있지만 작동하지 않습니다. –
이것은 좋은 출발점입니다. http://coding.smashingmagazine.com/2011/11/24/how-to-set-up-a-print-style-sheet/ – raidenace