B/S——C/S樣式
document.onkeydown = hotkey;
function hotkey() {
var a = window.event.keyCode;
alert(a) ;
if ((a == 81) && (event.altKey)) {// alt+q
alt_q() ;
}
if ((a == 77) && (event.ctrlKey))// alt+m
{
ctrl_m() ;
}
}
document.onkeydown = hotkey;
function hotkey() {
var a = window.event.keyCode;
alert(a) ;
if ((a == 81) && (event.altKey)) {// alt+q
alt_q() ;
}
if ((a == 77) && (event.ctrlKey))// alt+m
{
ctrl_m() ;
}
}