Latest web development tutorials

onpause event

Event Object Reference Event objects

Examples

Executed when the video is paused JavaScript:

<Video onpause = "myFunction ()">

try it"

Bottom of this article contains more examples.


Definition and Usage

Onpause event fires when the video / audio (audio / video) Pause.

Tip: onplay trigger event in the video / audio (audio / video) to start playback.


Browser Support

Figures in the table represent the first browser to support this version of events.

event
onpause Yes 9.0 Yes Yes Yes


grammar

In HTML:

<Elementonpause = "myScript"> try

In JavaScript:

object .onpause = function () {myScript }; try

JavaScript, use the addEventListener () method:

object .addEventListener ( "pause", myScript ); try

Note: Internet Explorer 8 and earlier versions of IE do not support addEventListener () method.


technical details
Whether to support the bubble: No
It can be canceled: No
Event Type: Event
Supported HTML tags: <Audio>, <video>


Examples

More examples

Examples

Execute JavaScript in the audio pause:

<Audio onpause = "myFunction ()">

try it"


Event Object Reference Event objects