Simple JavaScript Checkbox Validation

前端 未结 11 2012
长情又很酷
长情又很酷 2020-12-10 03:56

I usually work with PHP so sadly don\'t have some basic JS principles down. This is all I want to accomplish--I\'ve seen many posts on this topic but they are usually beyon

11条回答
  •  被撕碎了的回忆
    2020-12-10 04:30

    Guys you can do this kind of validation very easily. Just you have to track the id or name of the checkboxes. you can do it statically or dynamically.

    For statically you can use hard coded id of the checkboxes and for dynamically you can use the name of the field as an array and create a loop.

    Please check the below link. You will get my point very easily.

    http://expertsdiscussion.com/checkbox-validation-using-javascript-t29.html

    Thanks

提交回复
热议问题