Firefox 3.5.2刷新(F5)会导致突出显示的表单值被复制到下一个字段 [英] Firefox 3.5.2 Refresh(F5) causes Highlighted Form value to get copied to next field

查看:88
本文介绍了Firefox 3.5.2刷新(F5)会导致突出显示的表单值被复制到下一个字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



基本上,当我把注意力集中在一个输入字段上,然后按下f5键,输入的内容字段被复制到F5刷新后的下一个表单字段。



但是,如果您检查HTML源代码,则值将正确加载。
我没有这个问题在IE8或Safari 4.0.3中。

如果我执行硬刷新或运行window.location,则不会发生此问题。刷新(true)。



在F5刷新后: http://i805.photobucket.com/albums/yy339/abepark/after.jpg

下面是一个概览。

解决方案

我相信你应该考虑的是 autocomplete 属性,
您应该在输入框中将其设置为关闭。但是要小心,因为这会触发两个效果。


  1. 当您刷新页面时,它不会记住旧值

  2. 该输入框中已经使用的值的默认下拉列表也将被禁用。

如果您想保持第二个行为,你应该用JS重新设置autocomplete属性。


I am having a strange issue in Firefox 3.5.2 with F5 refresh.

Basically, when I focus on an input field and hit f5 the contents of that input field gets copied to the next form field after the F5 refresh.

But, if you inspect the HTML source code, the values are correctly loaded. I am not having this issue in IE8 or Safari 4.0.3.

The problem does not occur if I do a hard refresh or run window.location.refresh(true).

After F5 Refresh: http://i805.photobucket.com/albums/yy339/abepark/after.jpg

Here's an overview of what's going on.

解决方案

I believe the thing you should look into is the autocomplete attribute, you should set it to off on the input box. However be careful since this will trigger two effects.

  1. When you refresh the page it won't remember the old values
  2. The default dropdown of the already used values on that input box will also be disabled.

If you want to keep the second behavior you should set the autocomplete attribute back to on with JS.

这篇关于Firefox 3.5.2刷新(F5)会导致突出显示的表单值被复制到下一个字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆