how to bind key combination ctrl+x+return in jquery

后端 未结 5 571
闹比i
闹比i 2021-01-02 16:59

Is there any way to catch key combination ctrl+x+return in jquery(or javascript), such that if user presses this key combination, a function

5条回答
  •  有刺的猬
    2021-01-02 17:43

    $("body").bind("keydown",keyDown);
    
    function keyDown(e){
        if((e.ctrlKey)&&(e.keyCode == 88)&&(e.keyCode == 13)){
            alert("Keys down are Ctrl + x + Return");
        }
    }
    

提交回复
热议问题