-5

Is there a way that if someone enters a site, everything that he writes will be entered in an input automatically so he doesn't need to click on it?

If already searched in the Internet, but I found nothing.

Vivek Jain
  • 2,730
  • 6
  • 12
  • 27
Mr Brickstar
  • 188
  • 1
  • 5
  • 17

2 Answers2

0

Well, here's the way I think:

document.querySelector('#your-input-id').focus();
Talha Quddoos
  • 556
  • 6
  • 17
0

Add focus to your input by below line.

document.getElementById('search').focus();

See Demo

document.getElementById('search').focus();
<input id="search">
Vivek Jain
  • 2,730
  • 6
  • 12
  • 27