I have 2 pages:
A page that has a checkbox and a form submit button
2nd A page that shows which checkboxes have been clicked
The problem is that I do not know how to pass the checkbox value from one page to another, could you 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>
Then my difficulty is on the 2nd page, I do not know how to pass which checksbox's were clicked