กรณีเมื่อมีปุ่มสำหรับกดสั่งพิมพ์หน้าเว็บเพจ หรือหน้ารายงาน ตัวอย่างเช่น
1 | < input type = "button" name = "button" id = "button" value = "Print" onclick = "print();" > |
เราสามารถกำหนด ไม่ให้แสดงปุ่มดังกล่าว ในหน้าที่พิมพ์ได้ โดยการใช้ attribute ชื่อ media โดยกำหนด media="print" ดังนี้
1 2 3 4 5 | <style type= "text/css" media= "print" > input{ display : none ; } </style> |
แล้วกำหนดการ properties ที่ชื่อ display เป็น none ให้กับ element นั้นๆ ในตัวอย่างนี้กำหนดให้ไม่แสดงแท็ก input เมื่อมีการพิมพ์