在MSCRM4的项目中,有一个特别的要求,需要把热键ctrl+s屏蔽掉,在onsave事件里添加以下脚本即可,当按下ctrl+s时,直接取消操作。function document.onkeydown() { if (event.ctrlKey == true && event.keyCode == 83) {//Ctrl+S window.event.cancelBubble = true;//禁止此次操作 }} Last modification:January 7, 2011 © Allow specification reprint Support Appreciate the author AliPayWeChat Like 如果觉得我的文章对你有用,请随意赞赏
One comment
debugger时event.keyCode获取到是0
window.event.cancelBubble = true
语句也不能起到禁用作用