js 响应快捷键

function keyUp(e,func) {
  var currKey=0,e=e||event;
  currKey=e.keyCode||e.which||e.charCode;
  var keyName = String.fromCharCode(currKey);
  if(currKey == 13){
if(func == 2){//查询商家
doQry();
}else{//提交
loginon();
}
}
}

你可能感兴趣的:(快捷键)