Radio buttons not checked in jQuery

前端 未结 7 708
盖世英雄少女心
盖世英雄少女心 2020-12-23 08:51

I have this line of code for page load:

if ($(\"input\").is(\':checked\')) {

and it works fine when the radio button input is checked. How

7条回答
  •  伪装坚强ぢ
    2020-12-23 09:38

    $('input:radio[checked=false]');
    

    this will also work

    input:radio:not(:checked)
    

    or

    :radio:not(:checked)
    

提交回复
热议问题