【问题标题】:Input with autofocus property on Android browsers在 Android 浏览器上使用自动对焦属性输入
【发布时间】:2020-02-15 04:37:41
【问题描述】:

使用时

<input type='text' autofocus>

用户可以在计算机浏览器上加载页面后直接开始输入,无需任何其他点击。

在 Chrome Android 上,input 确实收到了加载的焦点,但是没有打开键盘,那么autofocus 的所有点都丢失了。

如何让它在 Android 上正常运行?

【问题讨论】:

    标签: android html responsive html-input autofocus


    【解决方案1】:
    <input type='text' onload='this.click();' autofocus >
    

    【讨论】:

    • 很遗憾,这不起作用。 input 有焦点,但在 Chrome Android 上没有打开键盘。
    • 实例化 webview 时是否激活了 js?
    • 是的,我的浏览器中始终启用 JS,我从未禁用它。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-12-04
    • 2021-02-25
    • 2013-02-10
    • 2015-03-28
    • 2011-08-19
    • 2016-03-08
    • 2012-09-11
    相关资源
    最近更新 更多