1 回答
TA贡献1808条经验 获得超4个赞
如果我清楚地理解你的问题,那么我想你想要这样的东西
<div class="container d-flex justify-content-center">
<form action="{{ action('ReportController@show', ['id' => 'month']) }}" class="month-form" method="GET">
<select name="month" id="month" class="custom-select form-input month-select">
<option value="01" @isset($month_number) {{ $month_number == 01 ? 'selected' : '' }} @endisset>January</option>
<option value="02" @isset($month_number) {{ $month_number == 02 ? 'selected' : '' }} @endisset>February</option>
<option value="03" @isset($month_number) {{ $month_number == 03 ? 'selected' : '' }} @endisset>March</option>
<option value="04" @isset($month_number) {{ $month_number == 04 ? 'selected' : '' }} @endisset>April</option>
<option value="05" @isset($month_number) {{ $month_number == 05 ? 'selected' : '' }} @endisset>May</option>
<option value="06" @isset($month_number) {{ $month_number == 06 ? 'selected' : '' }} @endisset>June</option>
<option value="07" @isset($month_number) {{ $month_number == 07 ? 'selected' : '' }} @endisset>July</option>
<option value="08" @isset($month_number) {{ $month_number == 08 ? 'selected' : '' }} @endisset>August</option>
<option value="09" @isset($month_number) {{ $month_number == 09 ? 'selected' : '' }} @endisset>September</option>
<option value="10" @isset($month_number) {{ $month_number == 10 ? 'selected' : '' }} @endisset>October</option>
<option value="11" @isset($month_number) {{ $month_number == 11 ? 'selected' : '' }} @endisset>November</option>
<option value="12" @isset($month_number) {{ $month_number == 12 ? 'selected' : '' }} @endisset>December</option>
</select>
<button class="btn btn-secondary">Generate Report</button>
</form>
如果它不起作用然后尝试更改01为"01"等等...
- 1 回答
- 0 关注
- 104 浏览
添加回答
举报