<HEAD>...</HEAD> tagları arasına eklenecek kod
<script LANGUAGE="JavaScript">
<!-- ;
// numberguess is by Lancer - written 4 Jan 1999
// lancer@kp.planet.gen.nz
// Orkun Camgöz tarafindan Türkçeye uyarlandi. Sedatmail@operamail.com
// Bu JavaScript http://www.birnumara.net.tr.tc adresinden temin edilmistir.
var guessme=Math.round(Math.random()*(99)+1);
var speech='Guess my number (from 1 to 100)';
function process(mystery) {
var guess=document.forms.guessquiz.guess.value;
var speech='- Mantiksiz tahmin yapma ! ';
document.forms.guessquiz.guess.value='';
if (guess==mystery)
{
document.forms.guessquiz.prompt.value='Tebrikler :) ! '+mystery+' dogru tahmin!';
alert ('Dogru bildin. Tutmus oldugum sayi '+mystery+' idi ! \n\nTamam dügmesine tiklayarak bu sayfada baska bir oyuna baslayabilirsin.');
speech='';
document.location=document.location;
}
if (mystery<guess)
{
speech='- '+ guess +' sayisindan küçük';
}
if (mystery>guess)
{
speech='- '+ guess +' sayisindan büyük';
}
if (guess=='')
{
speech='- Lütfen bir sayi tahmin et!'
}
document.forms.guessquiz.prompt.value=speech; document.forms.guessquiz.guess.focus();
}
// end hide -->
</script>
<BODY>...</BODY> tagları arasına eklenecek kod
<table border="1" width="300" bordercolor="#000000"
cellspacing="0" cellpadding="2" align="center">
<tr>
<td width="100%" bgcolor="#424B66" align="center"><font face="Verdana" color="#D1CEA7"><strong>Sayi
Tahmini Oyunu</strong></font></td>
</tr>
<tr>
<td width="100%" bgcolor="#C5BE8F"><p align="center"><font color="#C5BE8F"><!--webbot
bot="HTMLMarkup" startspan --><FORM onSubmit="" NAME="guessquiz"><!--webbot bot="HTMLMarkup" endspan -->.</font><br>
<input type="text" name="prompt" size="33" value="- 1 ile 100 arasinda bir sayi tuttum"
style="font-family: Verdana; font-size: smaller; background-color: rgb(197,190,143); color: rgb(44,48,56); font-weight: bold; border: medium none"><br>
<font color="#AEA962">.</font><br>
<input type="text" name="guess" size="3"><font color="#AEA962"> <small><small><small><small>::</font><font
color="#808040"> </font></small></small></small></small><input type="button"
value="Tahmin Et" name="B1"
style="background-color: rgb(58,55,74); color: rgb(255,255,255)"
onClick="process(guessme)"></p>
<p align="right"><font face="Verdana"><strong><!--webbot bot="HTMLMarkup" startspan --></form><!--webbot
bot="HTMLMarkup" endspan --><a href="http://www.java.sayfasi.com" target="_blank"
style="font-family: Verdana; font-size: xx-small; color: rgb(35,34,51)"><small><small><small><small>Java.Sayfasi</small></small></small></small></a></strong></font></td>
</tr>
</table>