노력보다 상속
var contentBody = ""; function noPrint(){ contentBody = document.body.innerHTML; document.body.innerHTML = printArea.innerHTML; } function viewPrint(){ document.body.innerHTML = contentBody; } function newsPrint() { window.print(); } var clintAgent = navigator.userAgent; if ( clintAgent.indexOf("MSIE") != -1 ) { window.onbeforeprint = noPrint; window.onafterprint = viewPrint; ..