How to check a radio button with jQuery?

前端 未结 30 2134
独厮守ぢ
独厮守ぢ 2020-11-22 08:12

I try to check a radio button with jQuery. Here\'s my code:

30条回答
  •  旧时难觅i
    2020-11-22 08:47

    We should want to tell it is a radio button.So please try with following code.

    $("input[type='radio'][name='userRadionButtonName']").prop('checked', true);
    

提交回复
热议问题