GlobalEventHandlers.onpause

您正在阅读此内容的英文版本,因为该语系尚未翻译。 帮助我们翻译此文章吧!

概述

onpause可以用来获取或设置当前元素的onpause事件的事件处理函数。当媒体播放被暂停时,将触发pause事件。

语法

element.onpause = handlerFunction;
var handlerFunction = element.onpause;

handlerFunction应该是null或指定事件的JavaScript函数。

说明

Specification Status Comment
HTML Living Standard
onpause
Living Standard  

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
onpauseChrome Full support YesEdge ? Firefox Full support 3.5IE ? Opera ? Safari ? WebView Android Full support YesChrome Android Full support YesFirefox Android Full support 4Opera Android ? Safari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown

参阅