Skip to content Skip to sidebar Skip to footer

How To Uncheck A Radio Button In Struts2 Using Javascript

I have the following radio button. After selecting any radio button, I have a button 'CLEAR'. On clicking this button, the radio button should be unchecked. Could anyone help me wi

Solution 1:

Struts2 <s:radio> tag gives unique id-s to each generated radio button. So using isPriTobaccoUsrId id is not an option, use class of the element as selector.

$('.hixFieldText').prop('checked', false);

Solution 2:

$('#isPriTobaccoUsrId').removeAttr('checked');

Post a Comment for "How To Uncheck A Radio Button In Struts2 Using Javascript"