Hi
Why are you print
Count value using document.write?
you can write following in HEAD
<script language="JavaScript">
var count = 0;
function setText(){
if(document.check.jawapan.value == "A"){
alert("Tahniah. Jawapan anda betul");
count = 1;
}
else
{
alert("Jawapan anda salah. Sila cuba lagi");
count = 0;
}
document.getElementById('divOutput').innerHTML = count;
}
</script>
you can use as following in HTML body
<div id="divOutput"></div>
<input type="button" value="semak" önclick="setText()" />