check the field has been changed:-
var isDirty = Xrm.Page.getAttribute(“CRMFieldSchemaName”).getIsDirty();
alert(isDirty); // returns true if the field is dirty
You don't need to compare if you get true value that means the field has been changed.
Regards Faisal