Chrome仅在单击页面后才会升起自动填充输入事件

时间:2018-05-06 20:28:07

标签: javascript google-chrome autofill

填写表单,在Chrome for Mac中保存值,然后重新加载页面。 警报只会在点击页面后显示, 这是为什么?如何才能获得之后触发的输入事件 页面加载,而不是点击后?谢谢 link to reproduce the issue herethis is source 以下示例的代码:

    <form action="https://test.de" method="POST" name="loginform">
    <input oninput="alert('text')" type="text" id="name" placeholder="Username" name="username" />
    <input oninput="alert('pass')" type="password" id="password" placeholder="Password" name="password" />
    <input type="submit" />
    </form>
    <div class="log"></div>
    <script>document.querySelector("input").focus();</script>

0 个答案:

没有答案
相关问题