HTML onbeforeprint Attribute
Example
<body onbeforeprint="myFunction()">
Meaning
The onbeforeprint attribute is called before a print event. Found only on the body element.
Standard Syntax
<element onbeforeprint="script">
Browser Support
Status
Applies to:
The onbeforeprint attribute can be used on the following element:
Element | Attribute |
---|---|
<body> | onbeforeprint |
Attribute Values
Value | Description |
---|---|
script | Specifies the script to be run on onbeforeprint. |