我们的志愿者还没有将这篇文章翻译为 中文 (简体)加入我们帮助完成翻译
您也可以阅读此文章的English (US)版。

The copy event fires when the user initiates a copy action through the browser's user interface.

Bubbles Yes
Cancelable Yes
Interface ClipboardEvent
Event handler property oncopy

The original target for this event is the Element that was the intended target of the paste action. You can listen for this event on the Window interface to handle it in the capture or bubbling phases. For full details on this event please see the page on the Element: copy event.

Examples

window.addEventListener('copy', (event) => {
    console.log('copy action initiated')
});

Specifications

Specification Status
Clipboard API and events Working Draft

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
copy eventChrome Full support 58Edge Full support YesFirefox Full support YesIE No support NoOpera Full support 45Safari Full support YesWebView Android Full support 58Chrome Android Full support 58Firefox Android Full support YesOpera Android Full support 43Safari iOS ? Samsung Internet Android ?
clipboardDataChrome Full support 58Edge Full support YesFirefox Full support 22IE No support NoOpera Full support 45Safari Full support YesWebView Android Full support 58Chrome Android Full support 58Firefox Android Full support 22Opera Android Full support 43Safari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown

See also

文档标签和贡献者

标签: 
此页面的贡献者: wbamberg
最后编辑者: wbamberg,