我有:
var answers = [];
var frage1 = document.getElementById("frage1").innerHTML;
frage1antwort1 = $('#frage1antwort1:checked').length; f.Example Value = 0
frage1antwort2 = $('#frage1antwort2:checked').length; f.Example Value = 0
frage1antwort3 = $('#frage1antwort3:checked').length; f.Example Value = 1
var frage2 = document.getElementById("frage2").innerHTML;
frage2antwort1 = $('#frage2antwort1:checked').length; f.Example Value = 0
frage2antwort2 = $('#frage2antwort2:checked').length; f.Example Value = 0
frage2antwort3 = $('#frage2antwort3:checked').length; f.Example Value = 1
var frage3 = document.getElementById("frage3").innerHTML;
frage3antwort1 = $('#frage3antwort1:checked').length; f.Example Value = 1
frage3antwort2 = $('#frage3antwort2:checked').length; f.Example Value = 0
frage3antwort3 = $('#frage3antwort3:checked').length; f.Example Value = 0
var frage4 = document.getElementById("frage4").innerHTML;
frage4antwort1 = $('#frage4antwort1:checked').length; f.Example Value = 0
frage4antwort2 = $('#frage4antwort2:checked').length; f.Example Value = 1
frage4antwort3 = $('#frage4antwort3:checked').length; f.Example Value = 0
var frage5 = document.getElementById("frage5").innerHTML;
frage5antwort1 = $('#frage5antwort1:checked').length; f.Example Value = 0
frage5antwort2 = $('#frage5antwort2:checked').length; f.Example Value = 1
frage5antwort3 = $('#frage5antwort3:checked').length; f.Example Value = 0
我正在尝试构建一个包含问题的数组并为其选择答案。我没有什么是对的。结果[问题= 1,答案= 3],类似的东西。请帮忙!