html - check or uncheck radio buttons when i click on text -


<input type="radio" name="allotdeallot" value="allotment" />allotment <input type="radio" name="allotdeallot" value="de-allotment" />de-allotment 

i have 2 radio buttons want check or uncheck on label click.

as per html standards, every form element must have label attach it. wish hide text of label, can hide text of lable, using position:absolute label. here answer,

<input id="allotment" type="radio" name="allotdeallot" value="allotment" /><label for="allotment">allotment</label> <input id="de-allotment" type="radio" name="allotdeallot" value="de-allotment" /><label for="de-allotment">de-allotment</label> 

the id of input field must same for attribute of label.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -