Make text input fields remember previously entered data

前端 未结 7 1958
夕颜
夕颜 2021-02-18 23:30

My text inputs seem not to remember values that have been typed before. For example, many websites that I don\'t even have an account on, but have, for example entered my email

7条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-19 00:17

    In most browsers, you can make your browser display values previously entered in input fields by giving a name to the input. For example:

    
    

    If the field has no name attribute, the browser won't show suggestions.

    Also check if javascript prevents the default action on submit.

提交回复
热议问题