$(function () {
$("#dropdown").live("change keyup", function () {
$("#theform").submit();
});
});
<form method="GET" id="theform" action="">
<select name="dropdown" id="dropdown">
<option value="1">One</option>
<option value="2">Two</option>
<option value="3" id="nosubmit">Three</option>
</select>
</form>
如果选择了选项三,我想显示另一个下拉列表(不提交表单):
<form method="GET" id="theform2" action="">
<select name="dropdown2" id="dropdown2">
<option value="4">Four</option>
<option value="5">Five</option>
<option value="6">Six</option>
</select>
</form>
如果选择了一个特定选项,我该怎么做才能不让它自动提交?Also when that option is selected how would I know? 在这种情况下,我需要显示另一个下拉列表。