Membuat tombol print this page dengan html CSS dan javascript

 



<html>

    <head>

        <title>Print Button</title>

        <style>

            .btn-print {

                background-color: #4CAF50;

                border: none;

                color: white;

                padding: 8px 16px;

                text-align: center;

                font-size: 16px;

                margin: 4px 2px;

                cursor: pointer;

            }

        </style>

    </head>

    <body>

        <button class="btn-print" onclick="printPage()">Print</button>

        <script>

            function printPage(){

                window.print();

            }

        </script>

    </body>

</html>

Posting Komentar

Lebih baru Lebih lama

Formulir Kontak