运行 ❯
获取您的
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <body> <h1>The autocomplete attribute</h1> <p>Here we have a form with the autocomplete attribute set to "new-password", meaning that we are expecting a new password here, so it is no need for the browser to try to fill in this form.</p> <form action="/action_page.php"> � <label for="username">Username:</label> � <input type="text" id="username" name="username"><br><br> � <label for="password">Password:</label> � <input type="password" id="password" name="password" autocomplete="new-password"><br><br> � <input type="submit"> </form> <p>Here is what happens if we remove the autocomplete="new-password" attribute:</p> <form action="/action_page.php"> � <label for="username">Username:</label> � <input type="text" id="username" name="username"><br><br> � <label for="password">Password:</label> � <input type="password" id="password" name="password"><br><br> � <input type="submit"> </form> </body> </html>