The Wayback Machine - https://web.archive.org/web/20150928024300/https://developer.mozilla.org/zh-TW/docs/Web/API/ErrorEvent

Join MDN and developers like you at Mozilla's View Source conference, November 2-4 in Portland, Oregon. Learn more at https://viewsourceconf.org/.

ErrorEvent

由 1 位貢獻者:

This translation is incomplete. Please help translate this article from English.

ErrorEvent 介面是用來提供程式碼或是檔案的錯誤訊息的事件。

Properties

此介面繼承了其父 Event 的 properties 。

ErrorEvent.message Read only
DOMString 提供具可讀性的關於問題的錯誤訊息。
ErrorEvent.filename Read only
DOMString ,為發生錯誤的程式碼檔案的檔名。
ErrorEvent.lineno Read only
一 整數 ,為發生問題的程式的行數。
ErrorEvent.colno Read only
整數 ,為發生問題的程式的欄數。
ErrorEvent.error Read only
Is a JavaScript Object that is concerned by the event.

Constructor

ErrorEvent()
建立一 ErrorEvent 事件,其包含提供的參數。

Methods

此介面繼承了其父 Event 的 methods。

Specifications

Specification Status Comment
WHATWG HTML Living Standard
The definition of 'ErrorEvent' in that specification.
Living Standard Added the error propriety and the 5th parameter to the constructor.
HTML5
The definition of 'ErrorEvent' in that specification.
Recommendation Initial definition.

瀏覽器支援度比較

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) (Yes) ? (Yes) (Yes)
colno property and 4th argument to constructor (Yes) (Yes) ? ? ?
error property and 5th argument to constructor (Yes) (Yes) Not supported Not supported Not supported
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes) (Yes) ? (Yes) (Yes)
colno property and 4th argument to constructor ? Not supported ? ? ?
error property and 5th argument to constructor Not supported Not supported Not supported Not supported Not supported

延伸閱讀

Document Tags and Contributors

Contributors to this page: shiyou0130011
最近更新: shiyou0130011,
隱藏側邊欄