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;
}
}