How to loop through a radio buttons group without a form?

后端 未结 3 1444
死守一世寂寞
死守一世寂寞 2021-02-02 12:44

How do I loop through a radio buttons group without a form in JavaScript or jQuery?

3条回答
  •  逝去的感伤
    2021-02-02 13:22

    I can't be too sure what you mean but if you want to do something to all radio buttons on a page you can do this:

    $("input:radio").each(function(){
       //do something here
    });
    

提交回复
热议问题