Radio Button won't stay check if I have a moda

2019-07-22 17:11发布

问题:

In a asp.net web project when the user selects a radio button I need a modal window to open up and prompt for user credentials.

I have the "TargetControlID" set to the radio button. The modal opens up just fine but when it goes away the radio button isn't checked.

EDIT:

Removed code for personal reasons

回答1:

When the Modal goes away, just recheck the radio button

$("radio button").attr('checked',true);