備忘録的プログラミングリファレンス

afterprint( onafterprint ) イベント

window.onafterprint

 afterprint( onafterprint ) イベントは、印刷ダイアログボックスが閉じられて、ページの印刷が開始すると発生するイベントです。 Eventインターフェイスのイベントタイプです。

 Window オブジェクトに関するイベントで WindowEventHandlers ミックスインにみることができます。

afterprint( onafterprint )イベント
window.addEventListener( "afterprint", ( event )=>{
	console.log( event );
}, false );

詳しくは Example を参照してください

 似たイベントにonbeforeprintイベントがあります。

ページ内 Index

- ad -

Syntax

in HTML

<tagelement onafterprint="function()">

in JavaScript

object.onafterprint = function(){ };
object.addEventListener("afterprint", script_);

備考(Remarks)

Bubblesno
Cancelableno
InterfaceEvent
Supported HTML Elements<body>

Example

 afterprint( onafterprint ) イベントの例です。

 

確認ボタンをクリックしてください。以下のHTML,CSS,Scriptコード例が実行されます。

- ad -