从下拉列表中选择一个选项时,我正在尝试提交表单。但它不起作用。谁能帮我解决这个问题。我在下面附上了我的代码。
提前致谢,
<div class="main" id="main">
<h2>Sell / Rent Advertisments</h2>
<form id="form1" name="form1" method="post" action="form.php">
<table width="531" height="121" border="0">
<tr>
<td width="81"><div>
<label>I wish to:</label>
</div></td>
<td width="76">
<label for="mediaId"></label>
<select name="mediaId" id="mediaId">
<option selected value="Sale">Sale</option>
<option value="Rent">Rent</option>
</select>
</td>
<td width="360"><label for="type"></label>
<select name="type" id="type">
<option value="_Any" selected="selected">- - Not Specified - -</option>
<option value="1" onChange="document.forms['form1'].submit()">Apartment</option>
<option value="3" onChange="document.forms['form1'].submit()">Building</option>
<option value="4" onChange="document.forms['form1'].submit()">Hotels/Guest Houses</option>
<option value="5" onChange="document.forms['form1'].submit()">House</option>
<option value="6" onChange="document.forms['form1'].submit()">Land</option>
</select></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</form>
</div>