문제

I would like to clear Radiobutton list selection once user click the button. I have tried the following code but clears the selection in browser. When I access from backend(C#) selection is there. It doesn't clear the selection of the control really I guess. Any suggestion please.

<SharePoint:DVRadioButtonList ID="rblLst" runat="server" RepeatDirection="Horizontal">
</SharePoint:DVRadioButtonList>
<br/><input type="button" id="btnClearrblfinance" value="Clear Selection" onclick="ClearSelectionrblfinance()" />

JQuery to clear the control

$("table[id$=rblLst] input:radio:checked").removeAttr("checked");
도움이 되었습니까?

해결책

Try below code:

$("table[id$=rblLst] input:radio:checked").prop('checked', false);

OR

$("#btnClearrblfinance").prop('checked', false);

Refer this link - https://jquery.com/upgrade-guide/3.0/#attributes

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top