mercredi 19 avril 2023

Checkbox disabel

I have created several checkboxes (4) in html. Now I want to program with javascript that there is basically only 1 option, so only one checkbox can be ticked with it. Probably not that difficult. Problem: I only worked with Java during my training and now I have to do it for a colleague who is currently ill. Since I currently have Corona and during the Easter holidays in Germany I feel like I'm the only one who works, I can't ask a colleague how it is to do.

I tried what would be logical for me and what I knew with my little javascript knowledge. So:

if (getElementById("Haken1")==true) { getElementById("Haken2")==false; } I thought that might work, but didn't.




Aucun commentaire:

Enregistrer un commentaire