javascript:function insert(arr,val){for(var i=0;i<arr.length;i++){if(arr[i]==val) return i;}return arr.push(val)-1;}var arr=document.getElementsByTagName("input");var questions=new Array();var answers=new Array();for(var i=0;i<arr.length;i++){if(arr[i].type=="radio"){var j = insert(questions,arr[i].name);if(answers[j]==undefined) answers[j]=eval(arr[i].value);else{answers[j]=Math.min(eval(answers[j]),eval(arr[i].value));}}}for(var i=0;i<questions.length;i++){var arr2 = document.getElementsByName(questions[i]); for(var j=0;j<arr2.length;j++) {if(eval(arr2[j].value)==answers[i])arr2[j].click();}} Code (markup): the code above when written in the address bar should give the correct answer in a multiple choice question (online iq test)or (here )but instead it always pick the first choice. How to fix this? I need an answer fast please
what, so the first choice is not correct? what is then? can you not make the questions a bit easier or make the first choice the correct one, always?