Advertisement
Home Open Editor ❯

HTML onafterprint Attribute

Example

<body onafterprint="myFunction()">

Try this code ❯

Meaning

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


Standard Syntax

<element onafterprint="script">


Applies to:

The onafterprint attribute can be used on the following element:

Element Attribute
<body> onafterprint

Advertisement

Attribute Values

Value Description
script Specifies the script to be run on onafterprint.
Home Open Editor ❯
Advertisement