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

beforeprint ( onbeforeprint )イベント

window.onbeforeprint

 beforeprint ( onbeforeprint )イベントは、印刷ダイアログボックスが開く前に発生するイベントです。 Eventインターフェイスのイベントタイプです。

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

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

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

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

ページ内 Index

- ad -

Syntax

in HTML

<tagelement onbeforeprint="function()">

in JavaScript

object.onbeforeprint = function(){ }; object.addEventListener("beforeprint", script_);

備考(Remarks)

Bubblesno
Cancelableno
InterfaceEvent
Supported HTML Elements<body>

Example

 beforeprint( onbeforeprint ) イベントの例です。

 

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

- ad -