|
-
Mar 16th, 2003, 01:07 PM
#1
Thread Starter
Fanatic Member
score??
hi,
I ask ten maths questions ..for each correct answer I want my script write 1 point..( on the same page)I mean I need a score board telling visitors how many they did correctly...how can I manage this?..(javascript)
thanks
-
Mar 18th, 2003, 02:31 AM
#2
Conquistador
You could alter the properties of a text box, changing the way it looks and also saving the value to that text box.
?
-
Mar 18th, 2003, 09:51 AM
#3
Thread Starter
Fanatic Member
ý need a score board
hi my friend,
if u can add some more scripts to the foolowings so that I have a scorebord..i will be gratefull to you
thanks.. for every correct answer let it .write.1 point..
thanks
<html>
<head>
<style>
#zz{background-color:green;position:absolute;top:120;left:95;width:50px;height:60px;}
#mm{background-color:black;position:absolute;top:120;left:200;width:45px;height:60px;}
#vv{background-color:gold;position:absolute;top:120;left:150;width:50px;height:60px;}
#qq{background-color:gold;position:absolute;top:120;left:250;width:45px;height:60px;}
#son{background-color:azure;position:absolute;top:120;left:300;width:50px;height:60px;}
#big{background-color:brown;position:absolute;top:20;left:80;width:350px;height:360px;z-index:1}
</style>
</head>
<body bgcolor="pink">
<center>
<div id="big" align=center>
<script language="javascript">
red=Math.floor(Math.random()*20)+1
document.write("<div id='zz'><h1><font color=red>",+red+"</div>")
blue=Math.floor(Math.random()*20)+1
document.write("<div id='mm'><h1><font color=blue>",+blue+"</div>")
document.write("<div id='qq'>=</div>")
document.write("<div id='vv'>+</div>")
var dogr=(red+blue)
var ans=prompt(+red+"...and..."+blue+"..is..","the answer.. is==")
if(ans==(blue+red))
{
document.write("good--job--","the--answer..is..",dogr)
document.write("<br>try again..8=))")
document.write("<div id='son'>",+dogr+"</div>")
}
else
{
document.write("SORRY","-the--answer..IS.=",dogr)
document.write("<div id='son'>",+dogr+"</div>")
document.bgColor="black"
document.write("<br>try again...8=((")
}
</script>
</div>
</body>
</html>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|