JS 현재 창 인쇄하기: window.print()

JS는 window.print() 메서드를 통해 현재 브라우저 창을 인쇄할 수 있습니다.

 

<!DOCTYPE html>
<html>
  <body>
    <h1>현재창 인쇄</h1>

    <button onclick = "window.print()">인쇄</button>
  </body>
</html>