JSFiddle - React, Tailwind, and code Playground

HTML

<input type="checkbox" value="uno" onclick="aggiungi(this)" /> uno <br/>
<input type="checkbox" value="due" onclick="aggiungi(this)" /> due <br/>
<input type="checkbox" value="tre" onclick="aggiungi(this)" /> tre <br/>

<div id="result">

</div>

JavaScript

function aggiungi(el) {
	
  let valore = el.value;
	
  // Questo è solo per mostrare che ho ottenuto il valore corretto
	let risultato = document.getElementById("result");
  risultato.innerText = valore;
}