I need to make 5 checkbox which all have a value, going from 1 to 5, I need to print out in a textbox the value when I check one, I can uncheck the boxes and the number disappears.. My problem lies in the uncheck part, I can't seem to find a way to remove the value from the textbox when it's unchecked.. I tried
if( aInput[0].checked == false){
aTxt[0].value = aInput[0].value;
}
But it dosen't work
<input type="checkbox" value="1" id = "R36" name="radio" onClick="textbox.value += (this.checked ? this.value : '0') + ', '"/>- If you want your checkbox to be initially checked, use thecheckedattribute:<input type="checkbox" checked="checked" />