Trong vài trang web bạn có thể thấy nó hỗ trợ thêm một nút (button) chức năng hỗ trợ cho người in nội dung của trang hiện tại ra giấy thông qua máy in, Đoạn mà JavaScript bên dưới sẽ chỉ bạn cách để làm nút in trang web này.
Hỗ trợ trình duyệt: Firefox, IE, Chrome, Safari, Opera
JavaScript Code:
Hỗ trợ trình duyệt: Firefox, IE, Chrome, Safari, Opera
JavaScript Code:
------------
<html>
<head>
<title>vnlives.net</title>
</head>
<body>
<input type=button name=print value="Print this page" onClick="javascript:window.print()">
</body>
</html>
----------------
<html>
<head>
<title>vnlives.net</title>
</head>
<body>
<input type=button name=print value="Print this page" onClick="javascript:window.print()">
</body>
</html>
----------------
No comments:
Post a Comment