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

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -