0
我想用java脚本在线测试示例应用程序&我正在面对正确变量的增量值的一些问题。增量值的结果显示出一些奇怪的值。如果有人能帮助我,我可以给Ÿ整个演示代码考试应用程序编程在线测试javascript
function checkAnswer(result,id,corrected)
{
var value;
var choice=document.getElementsByName('choice');
for(var i=0;i<choice.length;i++) //checkAnswer() function e problem ache
{
if(choice[i].checked)
{
value=choice[i].value;
}
}
if(value===result)
{
corrected++;
}
if(id==last)
{
databox.innerHTML='<h3> You have given '+corrected+' correct answers out of '+last;
}
}