If Radio Button is selected, perform validation on Checkboxes

前端 未结 4 1558
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-03 12:05

I\'m trying to work this form so when the first radio button is selected, run a certain validation. When the second radio button is selected, run a different validation, etc

4条回答
  •  感动是毒
    2021-01-03 12:46

    You need to use == or === for comparison. = assigns a new value.

    Besides that, using == is pointless when dealing with booleans only. Just use if(foo) instead of if(foo == true).

提交回复
热议问题