How to check a radio button with jQuery?

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

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

30条回答
  •  北海茫月
    2020-11-22 09:03

    Short and easy to read option:

    $("#radio_1").is(":checked")
    

    It returns true or false, so you can use it in "if" statement.

提交回复
热议问题