Ctrl+Enter jQuery in TEXTAREA

前端 未结 8 615
死守一世寂寞
死守一世寂寞 2020-12-12 13:59

How do I trigger something when the cursor is within TEXTAREA and Ctrl+Enter is pressed? Using jQuery. Thanks

8条回答
  •  时光说笑
    2020-12-12 14:53

    $('my_text_area').focus(function{ set_focus_flag });
    
    //ctrl on key down set flag
    
    //enter on key down = check focus flag, check ctrl flag
    

提交回复
热议问题