Which two conditions must be met before the OnChange event for a field is executed?
A.
The field detects keystrokes.
B.
The field loses focus.
C.
The value of the field is changed by a JavaScript function.
D.
The value of the field is changed by the user.
While I think Microsoft want you to answer A, I would argue it should say “The value in the field is altered by the user” or words to that effect. Keystrokes alone wouldn’t trigger it if the user changed the value but then put the same value back in – the field would therefore not be “dirty” and wouldn’t trigger any on change events.
From MSDN:
OnChange event
The OnChange event is available on every field. Generally, the OnChange event requires two conditions to be true:
The data in the field must change.
The field must lose focus.
B and D should be the answer.
Correct answer is – B & D.
The Microsoft MSDN documentation is clear:
The OnChange event is available on every field. Generally, the OnChange event requires two conditions to be true:
The data in the field must change.
The field must lose focus.
You can check it in https://msdn.microsoft.com/en-us/library/gg334701.aspx