我有一些表按日期排序,從2016年到2003年按日期顯示和隱藏表
試圖找出一種按日期顯示和隱藏這些表的方法。
<select id="Years">
<option value="y2016">2016</option>
<option value="y2015">2015</option>
<option value="y2014">2014</option>
</select>
<div class="TableView">
<table class="y2016" width="100%">
<thead>
<tr>
<th height="23">Date</th>
<th height="23">Subject</th>
<th height="23">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>06/14/16</td>
<td>Cost Management Report as of 6/14/2016</td>
<td>June <a href="">Cost Management Report</a></td>
</tr>
<tr>
<td>03/10/16</td>
<td>Cost Management Report as of 3/10/2016</td>
<td>March <a href="" target="_blank">Report </a></td>
</tr>
<tr>
<td>05/21/15</td>
<td>April - Cost Management Report</td>
<td>April <a href="" target="_blank">Report</a></td>
</tr>
<tr>
<td>04/06/15</td>
<td>March - Cost Management Report</td>
<td>March <a href="" target="_blank">Report</a></td>
</tr>
<tr>
<td>02/06/15</td>
<td>January - Cost Management Report</td>
<td>January <a href="" target="_blank">Report</a></td>
</tr>
</tbody>
</table>
</div>
div class="Tables">
<table class="y2015" width="100%">
<thead>
<tr>
<th height="23">Date</th>
<th height="23">Subject</th>
<th height="23">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>05/21/15</td>
<td>April - Cost Management Report</td>
<td>April <a href="" target="_blank">Report</a></td>
</tr>
<tr>
<td>04/06/15</td>
<td>March - Cost Management Report</td>
<td>March <a href="" target="_blank">Report</a></td>
</tr>
<tr>
<td>02/06/15</td>
<td>January - Cost Management Report</td>
<td>January <a href="" target="_blank"> Report</a></td>
</tr>
<tr>
<td>10/31/14</td>
<td>Response to Notice of Violation</td>
<td><a href="">report</td>
</tr>
<tr>
<td>10/31/14</td>
<td>October - Cost Management Report</td>
<td>October <a href="http://www.dpw.co.santa-cruz.ca.us/Sanitation/CSA7CMR103114.pdf" target="_blank">Cost Management Report</a></td>
</tr>
</tbody>
</table>
所以y2016會顯示然後我會選擇y2015,那會顯示2015表格等等。
任何建議我有一個腳本,但只顯示和隱藏只有一年。
你能爲你的表格的HTML和CSS你有嗎? – Josh
目前沒有CSS,但我想做一個顯示沒有CSS或只是有jQuery處理 –