Basically I need to check if the value is changed in a textbox on the \'blur\' event so that if the value is not changed, I want to cancel the blur event.
If it possible
Why not just maintaining a custom flag on the input element?
input.addEventListener('change', () => input.hasChanged = true); input.addEventListener('blur', () => { if (!input.hasChanged) { return; } input.hasChanged = false; // Do your stuff });
https://jsfiddle.net/d7yx63aj