executionContext.getEventArgs()

In Dynamics CRM Java script, a function/Event handler can be added on OnChange of a field or OnSave of the form.

If the function is triggered we can get the source of the event by writing  executionContext.getEventArgs(). This method returns null for any event other than the Save event.

so to see if the event handler triggered on Save event we can check as below

OnSaveChangeAccount:function(executionContext)
{
var eventArgs = executionContext.getEventArgs(); //This method returns null for any event other than the Save event.
if (eventArgs != null) //Means function triggered on save event
{
if(eventArgs.getSaveMode()==2)
{

//code logic

}
}
},