Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> JavaScript

สร้างปุ่ม Print ได้โดยไม่ใช้ JavaScript หรือไม่?

ได้ สร้างปุ่ม Print หรือทำให้รูปภาพเป็นปุ่ม Print ได้ง่ายๆ

ตัวอย่าง

<!DOCTYPE html> <html> 
  <body> 
    <a href="javascript:window.print()">
      <img src="https://www.tutorialspoint.com/computer_fundamentals/images/inkjet_printer.jpg" height="50" alt="print the page">
    </a> 
    <p>Click above to print the page.<p> 
  </body> 
</html>