翻譯不完整。請協助 翻譯此英文文件。
概要
表示事件是否能被取消。
語法
bool = event.cancelable
- 布林值,若為
true
代表事件可以被取消。
範例
var bool = event.cancelable;
布林值為
true
或 false
取決於是否能取消事件的預設行為。
備註
Whether an event can be canceled or not is something that's determined when that event is initialized.
To cancel an event, call the preventDefault()
method on the event. This keeps the implementation from executing the default action that is associated with the event.
規範
Specification | Status | Comment |
---|---|---|
DOM The definition of 'Event.cancelable' in that specification. |
Living Standard | |
DOM4 The definition of 'Event.cancelable' in that specification. |
Recommendation | |
Document Object Model (DOM) Level 2 Events Specification The definition of 'Event.cancelable' in that specification. |
Recommendation | Initial definition. |