php - 密码属性填充不需要的用户名和密码
问题描述
我正在尝试在 php 中创建一个登录页面。
我收到了表单并且登录验证工作正常,但是当我转到index.php
我的登录页面时,登录凭据会自动填充不需要的凭据,如下所示。
而我的登录页面应该是这样的..
我的表格如下:
<form action="check_login.php" method="post">
<label id="uname">User Name: </label><input type="text" placeholder="Enter Username" name="uname" required="required"> <br>
<label id="psw">Password: </label><input type="password" placeholder="Enter Password" name="psw" required="required"> <br> <br>
<button type="submit" name="login">Login </button>
</form>
当我使用它时type=text
,它工作正常..
我也试过autocomplete="off"
了,还是不行。。。
我究竟做错了什么?我是新手...请帮助我...
解决方案
改变
<input type="text" placeholder="Enter Username" name="uname" required="required">
和
<input type="text" placeholder="Enter Username" name="uname" required="required" autocomplete="off" />
自动填写表格是浏览器功能
推荐阅读
- python - sklearn fit_transform 和变换行为
- python-3.x - Python 3.x | FileNotFoundError: [Errno 2] 没有这样的文件或目录 | 从 .xlxs 写入 .csv
- javascript - 使用 aws-amplify React Native Web 崩溃
- scheme - 哪个最简单的评估模型可以解释 call/cc?
- java - 如何修复底部导航栏未正确显示
- java - 无法将具有类型参数的 Java 类重写为 Kotlin
- python - TkInter 问题:擦除前一个按下按钮的主体?
- powershell - powershell - 迭代 System.Management.Automation.PSObject
- ios - 有什么作用??在 Swift 案例中的变量声明上的意思是让模式匹配?
- git - 检查当前用户是否是 zsh 中 GitHub 远程的所有者