1

我想使用 html(和 django 后端)显示一个复选框网格。这是我为此编写的html。我正在使用最新版本的 Materialise。但是我得到的复选框是不可点击的。难道我做错了什么?<div>我读到 Materialize 复选框在标签中不起作用。我的桌子确实在<div>标签中。什么是解决方法?如果没有解决方法,如何使用默认的 html5 复选框?

<table class="striped bordered centered">
    <thead>
        <tr>
            <th>Departments</th>
            {% for program in program_list %}
            <th>{{program.name}}</th>
            {% endfor %}
        </tr>
    </thead>
    <tbody>
        {% for department in department_list %}
        <tr>
            <th>{{department.name}}</th>
            {% for program in program_list %}
                <td>
                    <input id="{{forloop.parentloop.counter}}_{{forloop.counter}}" type="radio">
                    <label for="{{forloop.parentloop.counter}}_{{forloop.counter}}"></label>
                </td>
            {% endfor %}
        </tr>
        {% endfor %}
    </tbody>
</table>
4

0 回答 0