2016-08-09 16 views

回答

0

试试这个代码:

$(document).bind('keydown', function(e) { 
    if(e.altKey && (e.which == 78)) { 
    e.preventDefault(); 
    // your code 
    console.log("Alt+N won't work here!"); 
    } 
}); 
+0

没有关系没有工作 – Dmitry

+0

添加这段代码后,我看到警报,然后按ALT + N – Dmitry

+0

@Dmitry检查更新的答案 –