<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>Uw woord is:</title>
</head>
<body>
<p> </p>
<form method="POST" name="f">
<p> </p>
<table border="0">
<tr>
<td>Uw woord is: </td>
<td><span id="s1"></span></td>
<td><span id="s2"></span></td>
<td><span id="s3"></span></td>
<td><span id="s4"></span></td>
<td><span id="s5"></span></td>
<td><span id="s6"></span></td>
</tr>
</table>
<p>Uw woord: <input type="text" size="20" name="a"></p>
<p><input type="button" name="B1" value="Start"
onclick="start()"><input type="button" name="B2"
value="Lingo" onclick="lingo()"><script language="JavaScript"><!--
//s1 = letter 1
//s2 = letter 2
//...
s1.innerText = "*"
s2.innerText = "*"
s3.innerText = "*"
s4.innerText = "*"
s5.innerText = "*"
s6.innerText = "*"
var woord = "woord";
var x = 0
function start()
{
//WILLEKEURIGE WOORDEN
willekeurig = Math.floor(Math.random() * 6) + 1
if(willekeurig == 1)
{
woord = "papier"
l1 = "p"
l2 = "a"
l3 = "p"
l4 = "i"
l5 = "e"
l6 = "r"
s6.innerText = l6
}
if(willekeurig == 2)
{
woord = "chemie"
l1 = "c"
l2 = "h"
l3 = "e"
l4 = "m"
l5 = "i"
l6 = "e"
s6.innerText = l6
}
if(willekeurig == 3)
{
woord = "konijn"
l1 = "k"
l2 = "o"
l3 = "n"
l4 = "i"
l5 = "j"
l6 = "n"
s6.innerText = l6
}
if(willekeurig == 4)
{
woord = "schuif"
l1 = "s"
l2 = "c"
l3 = "h"
l4 = "u"
l5 = "i"
l6 = "f"
s6.innerText = l6
}
if(willekeurig == 5)
{
woord = "pyjama"
l1 = "p"
l2 = "y"
l3 = "j"
l4 = "a"
l5 = "m"
l6 = "a"
s6.innerText = l6
}
if(willekeurig == 6)
{
woord = "draken"
l1 = "d"
l2 = "r"
l3 = "a"
l4 = "k"
l5 = "e"
l6 = "n"
s6.innerText = l6
}
}
function lingo()
{
if(document.f.a.value == woord)
{
s1.innerText = l1
s2.innerText = l2
s3.innerText = l3
s4.innerText = l4
s5.innerText = l5
s6.innerText = l6
document.body.style.backgroundColor="green";
document.p1.src = "gewonnen.gif"
alert("Je hebt het woord geraden");
document.body.style.backgroundColor="white";
}
else
{
document.body.style.backgroundColor="red";
alert("Het was een fout woord, probeer het nog een keer!");
document.body.style.backgroundColor="white";
x = x + 1
if(woord == "papier")
{
document.p1.src = "papier.gif"
}
if(woord == "chemie")
{
document.p1.src = "chemie.gif"
}
if(woord == "konijn")
{
document.p1.src = "konijn.gif"
}
if(woord == "schuif")
{
document.p1.src = "schuif.gif"
}
if(woord == "pyjama")
{
document.p1.src = "pyjama.gif"
}
if(woord == "draken")
{
document.p1.src = "draken.gif"
}
if(x == 1)
{
s5.innerText = l5
}
if(x == 2)
{
s4.innerText = l4
}
if(x == 3)
{
s3.innerText = l3
}
if(x == 4)
{
document.body.style.backgroundColor="red";
alert("Helaas, je hebt 3 keer na elkaar gefaald, je zal in de Mc'Donalds werken later! Het juist woord was: ");
}
}
}
// --></script></p>
<table border="0">
<tr>
<td><font size="7"><strong>TIP:</strong></font></td>
<td><img src="vraagteken.GIF" width="193"
height="183" name="p1"></td>
</tr>
</table>
<p> </p>
</form>
</body>
</html>
|