退回后就是图片里面的样子 怎样让他自动清空呢
prepare("insert into user(username,password,email) values (:username,:password,:email)");
$stmt->execute($_POST);
?>
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
浏览器问题吧,我之前用火狐好像也会出现这个问题。
在form里面添加<input type="reset" name="reset" style="display: none;" />
js代码添加
$("input[type=reset]").trigger("click"); //jquery提供的方法
或者遍历表单内的元素清空内容。
我这里有个链接你可以参考下http://www.cnblogs.com/shanlin/archive/2014/07/17/3850417.html
现在浏览器一般有自动保存用户名和密码的行为,可以使用js将用户名和密码设置成空:
var oIpt1=document.getElementById('ipt1');
var oIpt2=document.getElementById('ipt2');
oIpt1.value = '';
oIpt2.value = '';
使用ajax 提交登陆,只要就不会存在后退了