2012-06-20 3 views
0

은 내가 HashMap<Date, List<Service>>이 있고 난어떻게 combobox "onchange"이벤트를 처리할까요?

@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> 

index.scala.html 에서이 코드가 List<Service>을 표시

<select name="Dates" > 
    @for((k,v) <- dates) { 
     <option >@k</option> 
    } 
</select> 

index.scala.html에서 콤보 상자의 날짜를 표시 }

서버 쪽, 콤보 상자에서 선택한 항목을 알아야합니다.

내 질문에 대한 답변을 보려면 내 날짜에 "onchange" 이벤트를 내 콤보 상자에 표시 하시겠습니까?

답변

0
<select name="Dates" > 
    @for((k,v) <- dates) { 
     <option value="@k">@k</option> 
    } 
</select> 
+0

감사 합니다만, 어떻게 내 콘보 박스의 "onchange"이벤트를 처리 할 수 ​​있습니까? – user1469253

관련 문제