<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head>
<title></title>
</head>
<body>
<center>
<input type="button" id="btnQ" value="?????" />
<p id="txt1"></p>
<p id="result1"></p>
<input type="button" id="btnfly" value="DamselFly" style="position:fixed; left:260px; top:360px;" />
<input type="button" id="btnfrog" value="Frog" style="position:fixed; left:460px; top:360px;" />
<input type="button" id="btnhedge" value="HedgeHog" style="position:fixed; left:610px; top:360px;" />
<input type="button" id="btnnewt" value="Newt" style="position:fixed; left:810px; top:360px;" />
<input type="button" id="btnworm" value="SlowWorm" style="position:fixed; left:960px; top:360px;" />
<input type="button" id="btnthrush" value="Thrush" style="position:fixed; left:1150px; top:360px;" />
<input type="button" id="btnshell" value="Tortoiseshell" style="position:fixed; left:1300px; top:360px;" />
<input type="text" id="txtfly" value="DamselFly" />
<input type="text" id="txtfrog" value="Frog" />
<input type="text" id="txthedge" value="HedgeHog" />
<input type="text" id="txtnewt" value="Newt" />
<input type="text" id="txtworm" value="Slowworm" />
<input type="text" id="txtthrush" value="Thrush" />
<input type="text" id="txtshell" value="Tortoiseshell" />
</center>
</body>
</html>
<script language=vbscript>
Option Explicit
Dim Nums(7)
Dim n
Sub window_onLoad()
Randomize
Nums(1) = "Damselfly"
Nums(2) = "Frog"
Nums(3) = "HedgeHog"
Nums(4) = "Newt"
Nums(5) = "SlowWorm"
Nums(6) = "Thrush"
Nums(7) = "Tortoiseshell"
End Sub
Sub btnQ_onClick()
n = 1 + Int(7 * Rnd())
txt1.innerText = "What is a " & Nums(n) & "?"
End Sub
Sub btnfly_onClick()
If Cint (txtfly.value) = n Then
result1.innerText = "Correct!"
Else
result1.innerText = "Sorry, please try again." & n
End If
End Sub
Sub btnFrog_onClick()
If (txtfrog.value) = n Then
result1.innerText = "Correct!"
Else
result1.innerText = "Sorry, please try again." & n
End If
End Sub
Sub btnHedge_onClick()
If CInt(txtAns.value) = n Then
result1.innerText = "Correct!"
Else
result1.innerText = "Sorry, please try again." & n
End If
End Sub
Sub btnNewt_onClick()
If CInt(txtAns.value) = n Then
result1.innerText = "Correct!"
Else
result1.innerText = "Sorry, please try again." & n
End If
End Sub
Sub btnworm_onClick()
If CInt(txtAns.value) = n Then
result1.innerText = "Correct!"
Else
result1.innerText = "Sorry, please try again." & n
End If
End Sub
Sub btnThrush_onClick()
If CInt(txtAns.value) = n Then
result1.innerText = "Correct!"
Else
result1.innerText = "Sorry, please try again." & n
End If
End Sub
Sub btnshell_onClick()
If CInt(txtAns.value) = n Then
result1.innerText = "Correct!"
Else
result1.innerText = "Sorry, please try again." & n
End If
End Sub
</script>