如何在 Firefox 中刷新(F5)时重置为默认下拉列表选项? [英] How do I reset to default drop down list option on refresh(F5) in Firefox?
本文介绍了如何在 Firefox 中刷新(F5)时重置为默认下拉列表选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 Firefox 中有一个 ddl,它没有被重置为默认标题.我该怎么做呢?这是我目前所拥有的.
I have a ddl in firefox that does not get reset to the default caption. How do I do this? This is what I have so far.
<%string ddlVal = ""%>
<select id="detailSelect" name="DetailSelect">
<option <%if (ddlVal == "") { Response.Write("selected = "selected""); } %> value="" >--Choose One--</option>
<option <%if (ddlVal == "Building") { Response.Write("selected = "selected""); } %> value="Building">Building</option>
<option <%if (ddlVal == "Contents") { Response.Write("selected = "selected""); } %> value="Contents">Contents</option>
</select>
刷新时,ddl 是刷新前显示的内容,而不是默认的 ddl.我该如何纠正?
On a refresh, the ddl is the what is being displayed before the refresh, and not the default ddl. How do I corect this?
推荐答案
将 autocomplete="off"
添加到 标签.这是 Firefox 中记住您的下拉选择的已知问题.
add autocomplete="off"
to the <select>
tag. This is a known issue in firefox remembering your dropdown selection.
这篇关于如何在 Firefox 中刷新(F5)时重置为默认下拉列表选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文