java - convert radio button functionality into checkbox -
i have 2 radio buttons
<span class="text_content">td:</span> <input type="radio" name="lasttetanustype" value="td" <c:if test="${emergencycontactinfo.lasttetanustype == 'td' || emergencycontactinfo.lasttetanustype == null}">checked</c:if> > <span class="text_content">tdap:</span> <input type="radio" name="lasttetanustype" value="tdap" <c:if test="${emergencycontactinfo.lasttetanustype == 'tdap'}">checked</c:if> >
now want convert these radio buttons checkboxes functionality both can null 1 null 1 checked or both checked. if checked single checkbox value emergencycontactinfo.lasttetanustype=td
,if select second 1 value of emergencycontactinfo.lasttetanustype=tdap
and if select both value of emergencycontactinfo.lasttetanustype=td/tdap
.
what trying buddy ? understood want change radio buttons checkboxes not radio buttons behave checkboxex allright change type checkbox
simpel demo::
<!doctype html> <html> <body> <form action=""> <input type="checkbox" name="vehicle" value="bike">i have bike<br> <input type="checkbox" name="vehicle" value="car">i have car </form> </body> </html>
Comments
Post a Comment