问题
window.oncontextmenu = function() {
return false;
};
Will this work on all major browsers such that the right click will not be initiated?
回答1:
See this quirksmode page for a detailed compatibility table.
回答2:
QuirksMode has a comprehensive chart of support for the event. You can use it to decide if it meets your needs depending on browsers you support.
来源:https://stackoverflow.com/questions/7223143/is-oncontextmenu-cross-browser