preventing a user from changing the state of a radio button

后端 未结 4 2106
隐瞒了意图╮
隐瞒了意图╮ 2021-01-14 11:00

I am trying to prevent a user from changing the state of a radio button using jquery or javascript. I could do this with the disabled property but I don\'t like the grayed o

4条回答
  •  难免孤独
    2021-01-14 12:02

    Try this

    $(document).ready(function () {
        $('input[type = "radio"]').change(function () {
            return false;
        });
    });
    

提交回复
热议问题