How know if BootStrap Radio Button is Checked?

This question already has an answer here:

  • How can I know which radio button is selected via jQuery? 29 answers

  • if ($("#opt1").is(":checked"))) {
      // do A
    }
    
    else if ($("#opt2").is(":checked")) {
      // do B
    }
    

    You have a similar answer here: jQuery, checkboxes and .is(":checked")

    But I saw that you used ids attributes in the options so I use it for your answer..

    链接地址: http://www.djcxy.com/p/24580.html

    上一篇: 无需刷新页面即可获取无线电值

    下一篇: 如何知道BootStrap单选按钮是否被选中?