需要用原生才行, jquery无效

 

function showkey(event){
asc = event.keyCode;
key = String.fromCharCode(asc);
str += key;

console.log(str)
}

 document.onkeypress=showkey;

相关文章:

  • 2021-08-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-26
  • 2021-11-27
  • 2022-12-23
  • 2021-11-18
  • 2022-12-23
相关资源
相似解决方案