Javascript/JQuery事件参数.我不明白这个"e"论点是什么 [英] Javascript/JQuery event arguments. I don't understand what this 'e' argument is or does
问题描述
jQuery:
this.saveButton.click(function (e) {
scope.saveForm();
});
这是一条非常简单的JQuery行,它将.click()事件绑定到saveButton对象,并在事件触发时调用saveForm函数.
This is a very simple line of JQuery that binds the .click() event to the saveButton object and calls a saveForm function when the event is fired.
调用此事件时,"e"是什么?我认为它从未使用过.
When this event is called, what is 'e'? I don't think it is ever used.
推荐答案
e
可用于获取有关单击的特定信息(左,右或中心;单击的坐标;单击的DOM对象),但是该特定信息代码示例不使用它.
The e
can be used to obtain specific information about the click (left, right or center; coordinates clicked; DOM object clicked on), but this specific code sample doesn't use it.
请参见 http://api.jquery.com/category/events/event- object/了解可用内容的详细信息.
See http://api.jquery.com/category/events/event-object/ for details about what's available.
这篇关于Javascript/JQuery事件参数.我不明白这个"e"论点是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!