Skip to content

Commit

Permalink
feat:测试依旧
Browse files Browse the repository at this point in the history
  • Loading branch information
CaiSijian authored Jun 5, 2024
1 parent b5ce0fa commit 90395d1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
window.addEventListener('DOMContentLoaded',() => {
const input=document.querySelector('input')
input.addEventListener('keydown',(event) => {
if(event.code==='Enter'){
alert(event.code)
}
// @ts-check
window.addEventListener('DOMContentLoaded', () => {
const input = document.querySelector('input')
input.addEventListener('keydown', (event) => {
const message = `${event.code} ${event.key}`
alert(message)
})
})
// @ts-check
window.addEventListener('keydown', (event) => {
alert(event.code)
const message = `${event.code} ${event.key}`
alert(message)
})

0 comments on commit 90395d1

Please sign in to comment.