- 1

other

can anyone please help my why my code is not working? i really need it tomorrow :( please help me <script> function check() { var q1=document.myform.q1.value; var q2=document.myform.q2.value; var q3=document.myform.q3.value; var q4=document.myform.q4.value; var q5=document.myform.q5.value; var q6=document.myform.q6.value; var q7=document.myform.q7.value; var q8=document.myform.q8.value; var q9=document.myform.q9.value; var q10=document.myform.q10.value; var q11=document.myform.q11.value; var q12=document.myform.q12.value; var q13=document.myform.q13.value; var q14=document.myform.q14.value; var q15=document.myform.q15.value; var q16=document.myform.q16.value; var q17=document.myform.q17.value; var q18=document.myform.q18.value; var q19=document.myform.q19.value; var q20=document.myform.q20.value; var q21=document.myform.q21.value; var q22=document.myform.q22.value; var q23=document.myform.q23.value; var q24=document.myform.q24.value; var q25=document.myform.q25.value; var q26=document.myform.q26.value; var q27=document.myform.q27.value; var q28=document.myform.q28.value; var q29=document.myform.q29.value; var q30=document.myform.q30.value; var q31=document.myform.q31.value; var q32=document.myform.q32.value; var q33=document.myform.q33.value; var q34=document.myform.q34.value; var q35=document.myform.q35.value; var q36=document.myform.q36.value;

14th Dec 2017, 3:37 PM
Jeric Delos Reyes
Jeric Delos Reyes - avatar
3 Antworten
+ 10
What are you trying to do? If you explain your problem elaborately, I'm sure someone (not me, I'm terrible in JS 😞) will help you to solve this task in easier way (using an array, maybe?). What you've shared here, is definitely not an efficient way to solve any problem.
14th Dec 2017, 3:55 PM
Shamima Yasmin
Shamima Yasmin - avatar
0
var q37=document.myform.q37.value; var q38=document.myform.q38.value; var q39=document.myform.q39.value; var q40=document.myform.q40.value; var q41=document.myform.q41.value; var q42=document.myform.q42.value; var q43=document.myform.q43.value; var q44=document.myform.q44.value; var q45=document.myform.q45.value; var count=0; if(q1=="a"){ count++; } if(q2=="a"){ count++; } if(q3=="b"){ count++; } if(q4=="b"){ count++; } if(q5=="b"){ count++; } if(q6=="b"){ count++; } if(q7=="b"){ count++; } if(q8=="b"){ count++; } if(q9=="b"){ count++; } if(q10=="b"){ count++; } if(q11=="b"){ count++; } if(q12=="b"){ count++; } if(q13=="b"){ count++; } if(q14=="b"){ count++; } if(q15=="b"){ count++; } if(q16=="b"){ count++; } if(q17=="b"){ count++; } if(q18=="b"){ count+
14th Dec 2017, 3:38 PM
Jeric Delos Reyes
Jeric Delos Reyes - avatar
0
} if(q20=="b"){ count++; } if(q21=="b"){ count++; } if(q22=="b"){ count++; } if(q23=="b"){ count++; } if(q24=="b"){ count++; } if(q25=="b"){ count++; } if(q26=="b"){ count++; } if(q27=="b"){ count++; } if(q28=="b"){ count++; } if(q29=="b"){ count++; } if(q30=="b"){ count++; } if(q31=="b"){ count++; } if(q32=="b"){ count++; } if(q33=="b"){ count++; } if(q34=="b"){ count++; } if(q35=="b"){ count++; } if(q36=="b"){ count++; } if(q37=="b"){ count++; } if(q38=="b"){ count++; } if(q39=="b"){ count++; } if(q40=="b"){ count++; } if(q41=="b"){ count++; } if(q42=="b"){ count++; } if(q43=="b"){
14th Dec 2017, 3:38 PM
Jeric Delos Reyes
Jeric Delos Reyes - avatar