0
我想使用JSP/Servlets提交一個表到後端。表格提交失敗
我做了什麼:
我已經嵌入表數據爲形式。
問題:
我沒有得到我的數據到後端。 (我試圖做一個系統輸出)的代碼,
我得到默認值下拉列表(但不是我選擇的值)
:
<div class="container">
<form method="POST" action="hello2">
<div class="row clearfix">
<div class="col-md-12 table-responsive">
<table class="table table-bordered table-hover table-sortable" id="tab_logic">
<thead>
<tr >
<th class="text-center">
Age
</th>
<th class="text-center">
Gender
</th>
<th class="text-center">
Interest
</th>
<th class="text-center">
Language
</th>
<th class="text-center">
Threshold
</th>
<th class="text-center">
Options
</th>
<th class="text-center" style="border-top: 1px solid #ffffff; border-right: 1px solid #ffffff;">
</th>
</tr>
</thead>
<tbody>
<tr id='addr0' data-id="0" class="hidden">
<td data-name="age">
<select name="age">
<option value"">Select Age</option>
<option value"1">Any</option>
<option value"2">Less than 21</option>
<option value"3">Greater than 21</option>
</select></td>
<td data-name="gender">
<!-- <input type="text" name='mail0' placeholder='Email' class="form-control"/> -->
<select name="gender">
<option value"1">Any</option>
<option value"2">Male</option>
<option value"3">Female</option>
</select>
</td>
<td data-name="interest">
<!--<textarea name="desc0" placeholder="Description" class="form-control"></textarea> -->
<select name="interest">
<option value="sports">Sports team</option>
<option value="book">Book</option>
<option value="band">Musician/band</option>
<option value="tv">TV Show</option>
<option value="restaurant">Restaurant/cafe</option>
<option value="movie">Movie</option>
</select>
</td>
<td data-name="language1">
<select name="language">
<option value="english">English</option>
<option value="spanish">Spanish</option>
<option value="italian">Italian</option>
</select>
</td>
<td data-name="threshold1">
<!-- <input type="text" name="threshold" placeholder="Threshold" class="form-control"/> -->
<input type="text" name="threshold" placeholder="Threshold" class="form-control">
</td>
<td data-name="del">
<button nam"del0" class='btn btn-danger glyphicon glyphicon-remove row-remove'></button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<a id="add_row" class="btn btn-default pull-left">Add Row</a>
<input type="submit" class="btn btn-success pull-right" value="Submit"/>
</form>
</div>
我使用「JAVA」(JSP/Servelts)不是PHP。我可以將「默認」下拉數據添加到我的後端。但不是更改的數據(用戶選擇) – 2014-09-19 08:50:50