How can I get browser to prompt to save password?

前端 未结 20 1555
面向向阳花
面向向阳花 2020-11-22 16:20

Hey, I\'m working on a web app that has a login dialog that works like this:

  1. User clicks \"login\"
  2. Login form HTML is loaded with AJAX and displayed i
20条回答
  •  猫巷女王i
    2020-11-22 16:32

    Simple 2020 aproach

    This will automatically enable autocomplete and save password in browsers.

    • autocomplete="on" (form)
    • autocomplete="username" (input, email/username)
    • autocomplete="current-password" (input, password)

    Check out more at Apple's documentation: Enabling Password AutoFill on an HTML Input Element

提交回复
热议问题