0

How do i make check boxes and radio buttons compulsory using javascript?

10th May 2017, 5:15 AM
Surya Prakashreddy
Surya Prakashreddy - avatar
3 Answers
+ 1
add required attribute in input tag
10th May 2017, 5:51 AM
CalviŐ˛
CalviŐ˛ - avatar
+ 1
But Mr.Calvin my question is to make it compulsory using javascript
17th May 2017, 2:59 AM
Surya Prakashreddy
Surya Prakashreddy - avatar
+ 1
document.getElementById("idName").required = true
17th May 2017, 3:07 AM
CalviŐ˛
CalviŐ˛ - avatar