Please tell me, God, let the small keyboard of the HTML5 page pop up when the page first comes in.
ps: There is input in the page!
ps: Don’t tell me what focus to get. I’ve tried it all but it doesn’t seem to work. It doesn’t work on Android or Apple. Unless you click on it. . .
Making the small keyboard pop up can only be activated through
input
`focus, so when you enter the page, just let it automatically
focus`.You can use the
autofocus
attribute inhtml5
. Usually this setting is enough.There is no problem on Android, but
Safari
on the mobile side does not support theautofocus
attribute by default, and only events triggered by the user can makefocus
methods take effect, so we can only simulate a fake one.autofocus
:Online Demo