最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

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

matteradmin5PV0评论

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

Post a comment

comment list (0)

  1. No comments so far