pointerdown event is fired when a pointer becomes active. For mouse, it is fired when the device transitions from no buttons depressed to at least one button depressed. For touch, it is fired when physical contact is made with the digitizer. For pen, it is fired when the stylus makes physical contact with the digitizer.

冒泡 Yes
可取消 Yes
接口 PointerEvent
事件处理程序特性 onpointerdown

范例

使用 addEventListener() :

const para = document.querySelector('p');
para.addEventListener('pointerdown', (event) => {
  console.log('Pointer down event');
});
					

使用 onpointerdown 事件处理程序特性:

const para = document.querySelector('p');
para.onpointerdown = (event) => {
  console.log('Pointer down event');
};
					

规范

规范 状态
指针事件 过时

浏览器兼容性

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
pointerdown event Chrome 55 Edge 12
12
不支持 12 — 79 Alternate Name
Alternate Name Uses the non-standard name: mspointerdown
Firefox 59
59
Disabled ). To change preferences in Firefox, visit
IE 11
11
10 Alternate Name
Alternate Name Uses the non-standard name: mspointerdown
Opera ? Safari No WebView Android 55 Chrome Android 55 Firefox Android 29 Opera Android ? Safari iOS No Samsung Internet Android 6.0

图例

完整支持

完整支持

不支持

不支持

兼容性未知 ?

兼容性未知

用户必须明确启用此特征。

用户必须明确启用此特征。

使用非标名称。

另请参阅

元数据

  • 最后修改: