我开始编码了。我正在使用Symfony 3.3 我想用复选框隐藏(并显示)表格上的一个或一些特定行。 我尝试使用JavaScript和jQuery。我希望隐藏的行保持隐藏状态。 我不知道该怎么做。这里是我的树枝用symfony隐藏表格行(0123)
{% block body %}
<div class="container">
<h3>List of products</h3>
<table class="table table-striped">
<thead>
<tr>
<th>Product</th>
<th>Description</th>
<th>Size</th>
<th>Charges</th>
<th>Price</th>
<th>Actions</th>
<th>Desactivation</th>
</tr>
</thead>
<tbody>
{% for catalogue in catalogues %}
<tr class="table">
<td>{{ catalogue.product}} </td>
<td>{{ catalogue.description }} </td>
<td>{{ catalogue.size}} </td>
<td>{{ catalogue.charge }} </td>
<td>{{ catalogue.price }}</td>
<td>
<a href="{{ path('catalogue_list_edit', { 'id': catalogue.id }) }}"><span class="glyphicon glyphicon-edit"></span></a>
<a href="{{ path('catalogue_list_delete', { 'id': catalogue.id }) }}"><span class="glyphicon glyphicon-remove"></span></a>
</td>
<td><input type="checkbox" name="boutton35" value="Desactivation" />
</td>
</tr>
{% else %}
{% endfor %}
</tbody>
</table>
{% endblock %}
对不起,我看错。如果复选框位于隐藏行内,你如何显示隐藏行 –
我想他想用复选框进行“切换”并隐藏一些元素。你想隐藏整行或只是一些? – SD3L
直到我再次点击复选框! \t 整行! \t 我想我需要我所有产品的ID?但我不知道如何恢复它们。复选框可以留下?或者我不知道...一个按钮显示所有的按钮隐藏也许? – Koila69