HTML onafterprint event Attribute

❮ HTML Event Attributes

Example

<body onafterprint="myFunction()">

Meaning

The onafterprint attribute is called after a print event. Found only on the body element.


Standard Syntax

<element onafterprint="script">

Browser Support




Status







Attribute Values

Value Description
script Specifies the script to be run on onafterprint.



Technical Details

Supported HTML elements:

<body>
❮ HTML Event Attributes