ME ONLINE TEST-Heat Transfer Part 1

/*

* This function is called on loading of the page
* The current question value is set to 1
* The default marks value is set to 0

*/
function load()

{

//.rows[2].cells[4].innerText
document.getElementById(“currentquestion”).value=1;
document.getElementById(“totalscore”).value=0;

}

function nextButton()
{

var useranswer=0;

var marks= document.getElementById(“totalscore”).value; // By default the marks is 0

var counter=document.getElementById(“currentquestion”).value; // By default the counter value is 1

counter++;

if(counter < 20) { document.getElementById("sample" + counter ).style.display="block"; //here the next question will be visible document.getElementById("sample" + (counter-1) ).style.display="none"; //the previous question will be hided document.getElementById("currentquestion").value=counter; } else if(counter ==20) { document.getElementById("sample" + counter ).style.display="block"; document.getElementById("sample" + (counter-1) ).style.display="none"; document.getElementById("b1" ).style.display="none"; document.getElementById("b2" ).style.display="block"; } } function finish() { var useranswer=0; document.getElementById("samplet" ).style.display="none"; var marks= document.getElementById("totalscore").value; document.getElementById("b2" ).style.display="none"; document.getElementById("b3" ).style.display="block"; for(var j=1;j