File size: 223 Bytes
15fc415
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
let search_box = document.querySelector('input')
function search_web() {
  window.location = `search?q=${search_box.value}`
}

search_box.addEventListener('keyup', (e) => {
  if (e.keyCode === 13) {
    search_web()
  }
})