我有一个HashMap<Date, List<Service>>
,我在 index.scala 的组合框中显示日期.html
<select name="Dates" >
@for((k,v) <- dates) {
<option >@k</option>
}
</select>
显示List<Service>
我在 index.scala 中有此代码.html
@getServices(date: String) = {
<table class="computers zebra-striped">
<thead>
<tr>
<th>Service name</th>
<th>Price</th>
<th colspan="2">Counter</th>
<th>Note</th>
</tr>
<tr>
<th></th>
<th></th>
<th>start</th>
<th>end</th>
</tr>
</thead>
<tbody>
@for(s <- dates.get(utility.MonthYear.getUkrDate(date))) {
<tr>
<td>@s.getName</td>
<td>@s.getPriceString</td>
<td>@s.getFromCounterString</td>
<td>@s.getToCounterString</td>
<td>@s.getNote</td>
</tr>
}
</tbody>
</table>
}
我需要知道服务器端,从组合框中选择了什么项目。
那么,问题,如何在组合框中显示与我的事件日期一致的列表"onchange"
?
<select name="Dates" >
@for((k,v) <- dates) {
<option value="@k">@k</option>
}
</select>