SaveText.Ru

Без имени
  1. document.addEventListener('keydown', function(event) {
  2.         console.log("event.key:_", event.key, "_event.code", event.code)
  3.         if(+event.key) console.log("num") //addCharacter(event.key)
  4.   else if(event.key == "-") console.log("minus") //minus();
  5.   else if(event.key == "+") console.log("plus")
  6.   else if(event.key == "=")console.log("result")
  7.   else if(event.key == "/")console.log("delim")
  8.   else if(event.key == "*")console.log("multiply")
  9.   else console.log("nepon1")
  10. });

Share with your friends:

Print