Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个小表单,它在提交表单时保留表单字段
<input name="name" type="text" placeholder="Your Name" value="<?php print $_POST['name']; ?>" />
问题是当用户点击后退按钮时,值会被保留。
有没有办法清除 post 变量,如果没有,最好的方法是清除字段($name == '',$name == null)
谢谢
使用 autocomplete="off" 禁用浏览器填充表单输入。