onclose, onopen, onpostprint, onpostsave, onpreprint, onpresave attribute

Used By:body, pbr, pdf

The action to perform when a page is open or closed. Can be any action, but as it's going to be executed any time the page is closed this option should be used carefully so as not to lessen the viewers experience.

The pdf element can accept onopen, onclose, onpresave, onpostsave, onpreprint and onpostprint events, which are docment wide.

The body element and the individual pages in the CSS can accept onopen and onclose, which apply when the page is opened or closed.

#page1 { onClose:'pdf:playsound(goodbye.wav)' }

<pdf onpresave="javascript:clearForm()">