//새로운 윈도우를 열면서 호출창의 특정 아이디를 가진 DIV안의 내용을 윈도우 내용에 포함한 후 프린트
//예) 에서는 bodyprint 안의 내용을 프린트 한다.
function BodyPrint() {
new_window = window.open("","PrintWindow","width=700,height=600,left=10,top=10,scrollbars=yes,resizable=yes");
//new_window.document.open();
// 아래 부분에 새창으로 나타날 내용을 html형식에 맞게 만든다.
new_window.document.write("<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01//EN' 'http://www.w3.org/TR/html4/strict.dtd'>")
new_window.document.write("<html>");
new_window.document.write("<meta http-equiv='Content-Type' content='text/html; charset=euc-kr'>");
new_window.document.write("<HEAD><title>인쇄하기</title>");
new_window.document.write("<link href='../css/contents.css' rel='stylesheet' type='text/css'>");
new_window.document.write("<link href='../css/common.css' rel='stylesheet' type='text/css'>");
new_window.document.write("<link href='../css/slayout.css' rel='stylesheet' type='text/css'>");
new_window.document.write("</HEAD>");
new_window.document.write("<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 >");
new_window.document.write(document.all.bodyprint.innerHTML);
new_window.document.write("<script>window.print();</script>");
new_window.document.write("</body>");
new_window.document.write("</html>");
// 문서를 닫는다.
new_window.document.close();
}
'ASP' 카테고리의 다른 글
폴더검색 fso (0) | 2013.10.24 |
---|---|
asp 모든폼 갖고오기 (0) | 2013.10.24 |
Dext sumnail 새창으로 메일 보기 (0) | 2013.10.24 |
FSO 객체(FileSystemObject) (0) | 2013.10.24 |
form encoding 형식 변경 (0) | 2013.10.24 |