我正在使用ddslick。是否可以在变更时提交表格?
我的代码:
<form method="post" class="town_form">
<select name="town" id="select_town">
<option value="83">Chicago</option>
<option value="112">New York</option>
</select>
</form>
<script>
$('#select_town').ddslick({
onSelected: function(selectedData){
$('.town_form').submit();
}
});
</script>
但它没有用......有什么帮助吗?
答案 0 :(得分:0)
$('#select_town').dblclick(function() {
onSelected: function(data){
if (data.selectedIndex > 0) {
$('form.town_form').submit();
}
}
});