问题
I have following code.
window.onkeypress = function(event) {
if (event.charCode === 115 && event.ctrlKey) {
event.preventDefault();
// your code here....
alert("'Save As' dialog suppressed!");
}
};
That code works on Firefox, but in Chrome it doesn't work. Can you help me?
回答1:
You can't. Browsers don't expose (with good reason) the functionality to do this.
Don't annoy your users.
来源:https://stackoverflow.com/questions/28710702/how-to-disable-save-as-dialog-in-chrome