【问题标题】:how to avoid autosuggest by browser when the focus is on a field?当焦点在某个字段上时,如何避免浏览器自动提示?
【发布时间】:2023-01-13 13:25:13
【问题描述】:

我正在输入以禁用/避免特定字段的自动提示。

html sn-p 是这样的:

    <div class="form-group">
        <h4 class="whitish" for="name-of-car-id">Name of car (max length 30 chars)</h4>
        <input type="input" class="form-control" placeholder="" id="name-of-car-id" autocomplete="off">
        <span id='remainingC'></span>
        <small class="form-text text-muted">You will identify your group of IDs by this name</small>
        <div id='name-of-car-error' style='color:red; font-size: 18px;'></div>
    </div>

请注意,我添加了 autocomplete='off',但浏览器仍会提供建议。

【问题讨论】:

标签: html jquery bootstrap-4


【解决方案1】:

尝试用 type="text" 替换 input type="input"

【讨论】:

    猜你喜欢
    • 2011-08-24
    • 2013-09-01
    • 1970-01-01
    • 1970-01-01
    • 2011-09-08
    • 1970-01-01
    • 2013-02-26
    • 2013-03-28
    • 1970-01-01
    相关资源
    最近更新 更多