📜  jquery disable keypress - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:50.697000             🧑  作者: Mango

代码示例1
// turn off the enter key to stop form submitting
    jQuery(document).keypress(
        function(event){
            if (event.which == '13') {
                event.preventDefault();
            }
        }); // end disable keypress