Radio buttons not checked in jQuery

前端 未结 7 680
盖世英雄少女心
盖世英雄少女心 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:56

    if ($("input").is(":not(:checked)"))
    

    AFAIK, this should work, tested against the latest stable jQuery (1.2.6).

提交回复
热议问题