【问题标题】:Let checkboxes checked when submitted [duplicate]提交时让复选框选中[重复]
【发布时间】:2014-09-20 20:11:11
【问题描述】:

编辑:

我们如何在我提交后保留所有复选框并返回到同一页面? 当我提交时,它们被“重置”:/

这是我的表单代码:

<form action="" method="post" id="filtre_form">
<h1 class="text-center">Filtre</h1>
    <div class="col-md-6">
        <h4 class="text-center">Colonne à Afficher</h4>
            <div class="col-md-6">
                <ul>
                    <li>
                        <label class="checkbox">
                            <input type="checkbox" value="model" name="checkbox[]" id="Modele"> Modèle
                        </label>
                    </li>
                    <li>
                        <label class="checkbox">
                            <input type="checkbox" value="date_envoie" name="checkbox[]" id="Date"> Date envoi
                        </label>
                    </li>
                    <li>
                        <label class="checkbox">
                            <input type="checkbox" value="distributeur" name="checkbox[]" id="Distributeur"> Distributeur
                        </label>
                    </li>

【问题讨论】:

  • 是的,我已经读过那个帖子,但他使用的是 JS:/ 好的,谢谢,我会用另一种方式来学习 JS >
  • 表示你想煮鸡蛋而不吃鸡蛋。
  • 好的,谢谢,我想现在很清楚了:D
  • 如果您有其他问题,您应该提出一个新问题,而不是编辑您当前的问题。

标签: html css forms checkbox


【解决方案1】:

不可能。您不能仅通过 HTML/CSS 修改 checked 属性。

【讨论】:

  • +1,用于向 OP 说明。 :)
猜你喜欢
  • 1970-01-01
  • 2012-05-23
  • 1970-01-01
  • 2015-03-13
  • 2016-12-22
  • 2015-09-30
  • 1970-01-01
  • 2013-10-10
  • 2021-09-22
相关资源
最近更新 更多