JavaScript Reference/Javascript Methods/print

Материал из Web эксперт
Перейти к: навигация, поиск

"print()" Example

    
<html>
<body>
<script language="JavaScript">
    function function1() {
        window.print();
    }
</script>
<input type="button" value="Print this window" onclick="function1();">
</body>
</html>



"print()" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |window                                                        |
+----------------+--------------------------------------------------------------+



"print()" Syntax, Parameters and Note

Note:
Prints the current window"s document.
    
Syntax:
    
window.print()