js屏蔽回车键

document.onkeydown = function () {
            if (window.event && window.event.keyCode == 13) {
                window.event.returnValue = false;

            }

        }

原文地址:https://www.cnblogs.com/soundcode/p/4015426.html