简体   繁体   English

cfselect问题

[英]cfselect problem

I theory seems to be the answer to the pre populated selectbox issue. 理论上,这似乎是预先填充的选择框问题的答案。

<cfselect name = "regions" query = "getRegions" selected="10" value="id" display="name" ></cfselect> 

this is what it outouts 这就是出局

<option value="8">Dumfries & Galloway</option>
<option value="9">Dundee City</option>
<option value="10" selected="selected">East Ayrshire</option>
<option value="11">East Dunbartonshire</option>

but my option 10 is not selected automatically. 但是我的选项10不会自动选择。 The html looks ok any reason why? HTML看起来可以吗?

Thanks, 谢谢,

R. R.

If you are using Firefox then that is probably the reason, because it keeps form values persistent across page reloads. 如果您使用的是Firefox,则可能是原因,因为它使表单值在页面重新加载后保持不变。 You can use a different browser, or add something to the query string like ?abc=123 . 您可以使用其他浏览器,也可以在查询字符串中添加?abc=123

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM