最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Chrome doesn't remember input field value - Stack Overflow

programmeradmin1浏览0评论

I'm using HTML code like this:

<form method="post" action="#">
    <input type="text" name="inputFIeld" id="someVal" value="" />
    <button id="submitFun" type="submit">Dodaj</button>
</form>

The only thing I do is preventDefault on submit button click and then I make an ajax call to the server.

It works just fine on all browsers except chrome. Autoplete on chrome just doesn't work.

I'm using HTML code like this:

<form method="post" action="#">
    <input type="text" name="inputFIeld" id="someVal" value="" />
    <button id="submitFun" type="submit">Dodaj</button>
</form>

The only thing I do is preventDefault on submit button click and then I make an ajax call to the server.

It works just fine on all browsers except chrome. Autoplete on chrome just doesn't work.

Share Improve this question edited Mar 11, 2019 at 21:09 Zobia Kanwal 4,7734 gold badges17 silver badges38 bronze badges asked Sep 26, 2013 at 14:24 dinodsaurusdinodsaurus 5,0954 gold badges21 silver badges24 bronze badges 3
  • that drop down thing on input fields – dinodsaurus Commented Sep 26, 2013 at 14:27
  • I solved this chrome bug using invisible iframe. [stackoverflow./questions/8306640/… [1]: stackoverflow./questions/8306640/… – dinodsaurus Commented Sep 27, 2013 at 9:45
  • 1 Can't reproduce (8+ years later), onclick="event.preventDefault()" keeps text in Chrome. – tevemadar Commented Dec 3, 2021 at 13:40
Add a ment  | 

1 Answer 1

Reset to default 0

I find a link on chrome site :

Chrome : You should have to activate autoplete :

https://support.google./chrome/answer/142893?hl=en

发布评论

评论列表(0)

  1. 暂无评论