Home >Web Front-end >JS Tutorial >Right-clicking on a web page does not support event.preventDefault and event.returnValue (need to add window)_javascript skills
The event.preventDefault() method is the default behavior for canceling events, but this method is not supported by IE. In IE, you need to use window.event.returnValue = false; to implement it.
{
if ( e && e.preventDefault ){ e.preventDefault();
} else { window.event.returnValue = false;
} }