0
I have 2 pages:
1º A page that has checkboxes and a form Ubmit button
2nd page showing which checkboxes were clicked
The problem is that I do not know how to pass the value of the checkbox from one page to the other, could help me?
<meta charset="utf-8">
<meta lang="pt-br">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
</title>
</head>
<body>
<form id="form" onsubmit="redirecionaPagina();" method="post">
<section class="checkbox-time-coracao">
<h2 class="h-dois-checkbox">Times:</h2>
<ul class="ul-times">
<li>
<input type="checkbox" id="saopaulo" />
<label for="saopaulo">São Paulo</label>
</li>
<li>
<input type="checkbox" id="palmeiras" />
<label for="palmeiras">Palmeiras</label>
</li>
<li>
<input type="checkbox" id="corinthians" />
<label for="corinthians">Corinthians</label>
</li>
</ul>
<div class="btn-enviar"><input type="submit" value="ENVIAR" class="a-btn-enviar"></div>
</section>
</form>
<script>
function redirecionaPagina(){
formAction = document.getElementById("form");
formAction.action = "pagina2.html";
}
</script>
</body>
There my difficulty is on the second page, I do not know how to pass which checksbox’s were clicked
Can you show us what you’ve done?
– BrTkCa
Juan, your question is too wide, would add the code you are trying to do?
– Flávio Granato
I edited it now, it’s better?
– Juan Lima