我有这个功能:
$("#btn").click(function(e,someOtherArguments)
{ //some code
e.stopPropagation();});
它可以工作,但是如果我命名了函数,我就不能使用e
它,因为它是未定义的。
var namedFunction= function(e,someOtherArguments)
{
//some code
e.stopPropagation();
}
$("#btn").click(namedFunction(e,someOtherArguments));
我想使用namedFunction
它,因为有几个按钮使用它。