+ 1

Checkboxes - getting score using JavaScript array?

My code didn't work. i got 4 checkboxes and I want to check two options so I use this function checkquest() var question3 == "unknow" var question3Array= document.getElementById("question 3").getElementsByTagName("input); for(var i = 0; question 3Array.lengths; i++){ if (question3Array [i]. checked) { question3 = question3Array [i].value if(question3 == "unknow") { errMsg = errMsg + "You need to answer...; return false} Else if(question3 == "A" and question3 == "C"{ return true:} else { return false }

29th Apr 2018, 12:51 PM
Kris V
1 Answer
0
there is 4 options in this question
29th Apr 2018, 12:52 PM
Kris V