diff --git a/index.html b/index.html index 4e156c4..543fd8a 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ Code:
-


+


Result:

ICAO:
IATA:
diff --git a/script.js b/script.js index e8bbb38..b7a69a0 100644 --- a/script.js +++ b/script.js @@ -45,6 +45,16 @@ function onload() { } } xhr.send(); + var box = document.getElementById("input") + box.addEventListener("keyup", function (event) { + + // Checking if key pressed is ENTER or not + // if the key pressed is ENTER + // click listener on button is called + if (event.keyCode == 13) { + document.getElementById("button").click(); + } + }) } function clear() {