jquery UI selectmenu - 如何在表单重置按钮上重置下拉列表 [英] jquery UI selectmenu - How to reset dropdown on form reset button
本文介绍了jquery UI selectmenu - 如何在表单重置按钮上重置下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有一个问题,jQuery.selectmenu
当我点击重置按钮,我希望它像所有其他字段重置。
任何输入现在刷新,但是这个插件不会刷新。
该怎么办?
Got a problem with jQuery.selectmenu when i click reset button i would like it to reset like all other fields. any input is refreshed right now, but with this plugin is not refreshing. what to do ?
更多细节:
<form action="#" name="editform">
<fieldset>
<select name="speed" id="speed">
<option value="Slower">Slower</option>
<option value="Slow">Slowwwwwwwwww</option>
<option value="Medium" selected="selected">Medium</option>
<option value="Fast">Fast</option>
<option value="Faster">Fasterrrrrrrrrrrrrrrr</option>
</select>
</fieldset>
<a class="refForm" href="javascript:document.editform.reset()">Reset</a>
</form>
现在,当我点击重置它不会重置(选择)下拉菜单
我想要所有选择字段返回到默认值,重置按钮单击。
now when i click reset it doesnt reset the (select) dropdown I want all select fields go back to default with reset button click.
btw .:这是插件:
维基jQuery-ui-selectmenu
btw.: This is the plugin: Wiki jQuery-ui-selectmenu
干杯!
Lucas
Cheers ! Lucas
推荐答案
重新设置表单的所有组合框
Reset all combobox of the form
$("form .select").selectmenu("index", 0);
这篇关于jquery UI selectmenu - 如何在表单重置按钮上重置下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文