radio 操作汇总

    科技2024-05-26  85

    1.change()事件

    $('input[type=radio][name=name]').change(function() { if (this.value == 'value1') { } else if (this.value == 'value2') { } });

    2.获取选中值

    $("input[name='name']:checked").val()

    3.click()事件

    $('input[type=radio][name=name]').click(function() { if (this.value == 'value1') { } else if (this.value == 'value2') { } });
    Processed: 0.015, SQL: 8