From d07424b141d502cb02144e74173ee06916da8af5 Mon Sep 17 00:00:00 2001 From: CaiSijian <112552123+CaiSijian@users.noreply.github.com> Date: Thu, 6 Jun 2024 03:26:32 +0800 Subject: [PATCH] update --- index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 046bdf5..812145a 100644 --- a/index.js +++ b/index.js @@ -1,14 +1,16 @@ // @ts-check /**@type {HTMLDivElement} */ const h1 = document.querySelector('h1') -h1.innerText='0.1.1' +h1.innerText='0.1.2' const input = document.querySelector('input') const textarea = document.querySelector('textarea') input.addEventListener('keydown', (event) => { - const message = `${event.code} ${event.key}` + const message = `input event +${event.code} ${event.key}` textarea.value = JSON.stringify(message) }) window.addEventListener('keydown', (event) => { - const message = `${event.code} ${event.key}` + const message = `window event +${event.code} ${event.key}` textarea.value = JSON.stringify(message) }) \ No newline at end of file