They could help me, I have 3 checkboxes and an input.
By clicking on the checks, pass the value to the input, until then everything is fine.
What I need is that when a check is unchecked only that value that passed to the input is deleted.
<input type="checkbox" id="checkbox" name="checkbox" onclick="campo.value += (this.checked) ? this.value:'' " value="Valor1" />
<input type="checkbox" id="checkbox2" name="checkbox2" onclick="campo.value += (this.checked) ? this.value:'' " value="Valor2" />
<input type="checkbox" id="checkbox3" name="checkbox3" onclick="campo.value += (this.checked) ? this.value:'' " value="Valor3" />
<input type="text" name="campo" id="campo" />