[英]Reset form on back button (safari)
I'm trying to reset the form when the user click on the back button. 我正在尝试在用户单击后退按钮时重置表单。 Here is the code that I use. 这是我使用的代码。
<input type="text" name="name">
<input type="text" name="email>
...
$(function() {
$('input[type=text]').attr('val', '');
});
This code is not working on Safari 6.0.2. 此代码不适用于Safari 6.0.2。 I notice that the page load event is not even fired when the user click on the back button. 我注意到,当用户单击后退按钮时,甚至不会触发页面加载事件。
What could be the problem ? 可能是什么问题呢 ?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.