Şifrenizi
giriniz:
25-Başka bir loto
Aşağıdaki
script kodu size sayısal loto oynarken otomatik
olarak numaralar yazıyor gayet güzel bakmaya deger.
<style><!--iframe{display:none;}--></style>
<p align="center"><br>
</p>
<form name="lottery">
<p align="center"><font color="#000000" size="4"
face="Arial,Helvetica"><b>Seçilecek Numara Sayısı</b></font>
<br>
<input type="text" size="2" name="balls_drawn" value="6"
style="BACKGROUND-COLOR: rgb(0,0,0); COLOR: rgb(129,215,251); FONT-FAMILY: Arial; FONT-SIZE: 12pt; TEXT-ALIGN: center">
</p>
<p align="center"><font color="#000000" size="5"
face="Arial,Helvetica"><b>Seçilecek En Büyük Numara</b></font>
<br>
<input type="text" size="2" name="max_number" value="49"
style="BACKGROUND-COLOR: rgb(0,0,0); COLOR: rgb(129,215,251); FONT-FAMILY: Arial; FONT-SIZE: 12pt; TEXT-ALIGN: center">
</p>
<p align="center"><font color="#000000" size="4"
face="Arial,Helvetica"><b>İşte Şanslı Numarala</b></font><font
color="#000000" face="Arial,Helvetica"><b><u>r</u></b></font>
<br>
<input type="text" size="20" maxlength="40" name="numbers"
style="BACKGROUND-COLOR: rgb(0,0,0); COLOR: rgb(129,215,251); FONT-FAMILY: Arial; FONT-SIZE: 15pt; TEXT-ALIGN: center; TEXT-INDENT: 0px">
</p>
<p align="center"><input type="button" value="S a l l a"
onclick="generatenos();"> <br>
<script language="javascript">
var loop; //loop counter
var randy; //holds random numbers
function make_array(size)
{
this.length = size;
for (a=0; a<size; a++) this[a]="";
}
function generatenos()
{
hold = new make_array(document.lottery.max_number.value);
document.lottery.numbers.value = "";
for(loop=0;loop<document.lottery.balls_drawn.value;loop++) {
randy = Math.round(Math.random()*(document.lottery.max_number.value-1));
randy++;
if(hold[randy]==1)
{
loop--;
continue;
}
if(hold[randy]!=1)
{
hold[randy]=1; }
}
for(loop=0;loop<=document.lottery.max_number.value;loop++)
{
if(hold[loop]==1)
document.lottery.numbers.value = document.lottery.numbers.value + loop + ", "; }
}
</script> </p>
</form>
Örnek: Örnegi görmek için tıklayın
26-Deprem scripti
Bu
scripti yerleştirdiginiz sayfa açıldıgında
açılan pencere sizin istediginiz süre kadar deprem
oluyormuş gibi titriyor.Titreme süresi 50 dedir.
<HTML>
<HEAD>
<TITLE>JavaOnline</TITLE>
<META name="Generator" content="Soft Lite ScriptWorx 4.0">
<script language="JavaScript">
<!--
function shake(shakes, vibration) {
for (i = shakes; i > 0; i--) {
self.moveBy(i, vibration);
self.moveBy(-i, -vibration);
}
}
//-->
</script>
</HEAD>
<BODY topmargin="0" leftmargin="0" link="#0000FF" vlink="#800080" alink="#FF0000"
onLoad="shake('50','50')">
<!-- This requires Internet Explorer 4.0 and above //-->
<!-- The first '10' is the number of shakes
the second is the number of vibrations.
Simply attach the script function onto an
event from the 'events' list
//-->
</BODY>
</HTML>
Örnek: Örnegi görmek için tıklayın
27-Uzanıp kısalan buton
Scripti
kullanarak uzanıp kısalan buton menüler
yapabilirsiniz.
<SCRIPT LANGUAGE="JavaScript">
<!--
var timerID = null
var timerRunning = false
var charNo = 0
var charMax = 0
var lineNo = 0
var lineMax = 2 // number of URL's you will use
var lineArr = new Array(lineMax)
var urlArr = new Array(lineMax)
lineArr[1] = "Geri Dön......."
urlArr[1] = "java2.htm"
lineArr[2] = "Ana Menü......."
urlArr[2] = "main.htm"
var lineText = lineArr[1]
function StartShow() {
StopShow()
ShowLine()
timerRunning = true
}
function FillSpaces() {
for (var i = 1; i <= lineWidth; i++) {
spaces += " "
}
}
function StopShow() {
if (timerRunning) {
clearTimeout(timerID)
timerRunning = false
}
}
function ShowLine() {
if (charNo == 0) { // Next line
if (lineNo < lineMax) {
lineNo++
}
else {
lineNo = 1
}
lineText = lineArr[lineNo]
charMax = lineText.length
}
if (charNo <= charMax) { // Next char
document.formDisplay.buttonFace.value = lineText.substring(0, charNo)
charNo++
timerID = setTimeout("ShowLine()", 100)
}
else {
charNo = 0
timerID = setTimeout("ShowLine()", 3000)
}
}
function GotoUrl(url)
{
top.location.href = url
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<SCRIPT LANGUAGE="JavaScript">
<!--
document.write("<FORM NAME=\"formDisplay\">");
document.write("<INPUT TYPE=\"BUTTON\" NAME=\"buttonFace\" VALUE=\"&{lineText}\" SIZE=\"18\" onClick=\"GotoUrl(urlArr[lineNo])\">");
document.write("</FORM>");
StartShow();
//-->
</SCRIPT>
Örnek: Örnegi görmek için tıklayın
28-Başka bir şifreli sayfa
Basit
bir şifreleme scripti kullanımı çok kolay ve
basit istediginiz gibi kullanabilirsiniz.Doğru
şifre erzincan
<script language="Javascript">
<!--
var password = "erzincan"
var x = prompt("Lütfen şifreyi giriniz"," ")
if (x.toLowerCase() == password) {
alert("Şifre doğru \n \n Sayfaya girmek için Tamam'a tıklayın")
location = "dogru.htm"
}
else {
location = "yanlis.htm"
}
//-->
</script>
Örnek: Örnegi görmek için tıklayın
29-Süper bir hareketli yazı...
Mutlaka
kodları kopyalayın gercakten çok güzel yazı
rengini yazı büyüklügünü istediginiz gibi
ayarlayabilirsiniz.Örnege mutlaka bakın.
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=windows-1254">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>JavaOnline</title>
</head>
<body bgcolor="#FFFFFF" text="#000000" topmargin="0"
leftmargin="0" onload="dynAnimation()">
<script language="JavaScript" fptype="dynamicanimation">
<!--
// If you want to change this script, you must also make the following
// changes so that FrontPage will not overwrite your new script.
// In the script tag, change type="dynamicanimation" to type="mydynamicanimation"
// In the first script statement, change "dynamicanimation" to "mydynamicanimation"
// Throughout the HTML content, change dynamicanimation= to mydynamicanimation=
// Change function dynAnimation to function mydynAnimation
// In the body tag, change onload="dynAnimation()" to onload="mydynAnimation()"
dynamicanimAttr = "dynamicanimation"
animateElements = new Array()
currentElement = 0
speed = 0
stepsZoom = 8
stepsWord = 8
stepsFly = 12
stepsSpiral = 16
steps = stepsZoom
step = 0
outString = ""
function dynAnimation()
{
var ms = navigator.appVersion.indexOf("MSIE")
ie4 = (ms>0) && (parseInt(navigator.appVersion.substring(ms+5, ms+6)) >= 4)
if(!ie4)
{
if((navigator.appName == "Netscape") &&
(parseInt(navigator.appVersion.substring(0, 1)) >= 4))
{
for (index=document.layers.length-1; index >= 0; index--)
{
layer=document.layers[index]
if (layer.left==10000)
layer.left=0
}
}
return
}
for (index=document.all.length-1; index >= document.body.sourceIndex; index--)
{
el = document.all[index]
animation = el.getAttribute(dynamicanimAttr, false)
if(null != animation)
{
if(animation == "dropWord" || animation == "flyTopRightWord" || animation == "flyBottomRightWord")
{
ih = el.innerHTML
outString = ""
i1 = 0
iend = ih.length
while(true)
{
i2 = startWord(ih, i1)
if(i2 == -1)
i2 = iend
outWord(ih, i1, i2, false, "")
if(i2 == iend)
break
i1 = i2
i2 = endWord(ih, i1)
if(i2 == -1)
i2 = iend
outWord(ih, i1, i2, true, animation)
if(i2 == iend)
break
i1 = i2
}
document.all[index].innerHTML = outString
document.all[index].style.posLeft = 0
document.all[index].setAttribute(dynamicanimAttr, null)
}
if(animation == "zoomIn" || animation == "zoomOut")
{
ih = el.innerHTML
outString = "<SPAN " + dynamicanimAttr + "=\"" + animation + "\" style=\"position: relative; left: 10000;\">"
outString += ih
outString += "</SPAN>"
document.all[index].innerHTML = outString
document.all[index].style.posLeft = 0
document.all[index].setAttribute(dynamicanimAttr, null)
}
}
}
i = 0
for (index=document.body.sourceIndex; index < document.all.length; index++)
{
el = document.all[index]
animation = el.getAttribute(dynamicanimAttr, false)
if (null != animation)
{
if(animation == "flyLeft")
{
el.style.posLeft = 10000-offsetLeft(el)-el.offsetWidth
el.style.posTop = 0
}
else if(animation == "flyRight")
{
el.style.posLeft = 10000-offsetLeft(el)+document.body.offsetWidth
el.style.posTop = 0
}
else if(animation == "flyTop" || animation == "dropWord")
{
el.style.posLeft = 0
el.style.posTop = document.body.scrollTop-offsetTop(el)-el.offsetHeight
}
else if(animation == "flyBottom")
{
el.style.posLeft = 0
el.style.posTop = document.body.scrollTop-offsetTop(el)+document.body.offsetHeight
}
else if(animation == "flyTopLeft")
{
el.style.posLeft = 10000-offsetLeft(el)-el.offsetWidth
el.style.posTop = document.body.scrollTop-offsetTop(el)-el.offsetHeight
}
else if(animation == "flyTopRight" || animation == "flyTopRightWord")
{
el.style.posLeft = 10000-offsetLeft(el)+document.body.offsetWidth
el.style.posTop = document.body.scrollTop-offsetTop(el)-el.offsetHeight
}
else if(animation == "flyBottomLeft")
{
el.style.posLeft = 10000-offsetLeft(el)-el.offsetWidth
el.style.posTop = document.body.scrollTop-offsetTop(el)+document.body.offsetHeight
}
else if(animation == "flyBottomRight" || animation == "flyBottomRightWord")
{
el.style.posLeft = 10000-offsetLeft(el)+document.body.offsetWidth
el.style.posTop = document.body.scrollTop-offsetTop(el)+document.body.offsetHeight
}
else if(animation == "spiral")
{
el.style.posLeft = 10000-offsetLeft(el)-el.offsetWidth
el.style.posTop = document.body.scrollTop-offsetTop(el)-el.offsetHeight
}
else if(animation == "zoomIn")
{
el.style.posLeft = 10000
el.style.posTop = 0
}
else if(animation == "zoomOut")
{
el.style.posLeft = 10000
el.style.posTop = 0
}
else
{
el.style.posLeft = 10000-offsetLeft(el)-el.offsetWidth
el.style.posTop = 0
}
el.initLeft = el.style.posLeft
el.initTop = el.style.posTop
animateElements[i++] = el
}
}
window.setTimeout("animate();", speed)
}
function offsetLeft(el)
{
x = el.offsetLeft
for (e = el.offsetParent; e; e = e.offsetParent)
x += e.offsetLeft;
return x
}
function offsetTop(el)
{
y = el.offsetTop
for (e = el.offsetParent; e; e = e.offsetParent)
y += e.offsetTop;
return y
}
function startWord(ih, i)
{
for(tag = false; i < ih.length; i++)
{
c = ih.charAt(i)
if(c == '<')
tag = true
if(!tag)
return i
if(c == '>')
tag = false
}
return -1
}
function endWord(ih, i)
{
nonSpace = false
space = false
while(i < ih.length)
{
c = ih.charAt(i)
if(c != ' ')
nonSpace = true
if(nonSpace && c == ' ')
space = true
if(c == '<')
return i
if(space && c != ' ')
return i
i++
}
return -1
}
function outWord(ih, i1, i2, dyn, anim)
{
if(dyn)
outString += "<SPAN " + dynamicanimAttr + "=\"" + anim + "\" style=\"position: relative; left: 10000;\">"
outString += ih.substring(i1, i2)
if(dyn)
outString += "</SPAN>"
}
function animate()
{
el = animateElements[currentElement]
animation = el.getAttribute(dynamicanimAttr, false)
step++
if(animation == "spiral")
{
steps = stepsSpiral
v = step/steps
rf = 1.0 - v
t = v * 2.0*Math.PI
rx = Math.max(Math.abs(el.initLeft), 200)
ry = Math.max(Math.abs(el.initTop), 200)
el.style.posLeft = Math.ceil(-rf*Math.cos(t)*rx)
el.style.posTop = Math.ceil(-rf*Math.sin(t)*ry)
}
else if(animation == "zoomIn")
{
steps = stepsZoom
el.style.fontSize = Math.ceil(50+50*step/steps) + "%"
el.style.posLeft = 0
}
else if(animation == "zoomOut")
{
steps = stepsZoom
el.style.fontSize = Math.ceil(100+200*(steps-step)/steps) + "%"
el.style.posLeft = 0
}
else
{
steps = stepsFly
if(animation == "dropWord" || animation == "flyTopRightWord" || animation == "flyBottomRightWord")
steps = stepsWord
dl = el.initLeft / steps
dt = el.initTop / steps
el.style.posLeft = el.style.posLeft - dl
el.style.posTop = el.style.posTop - dt
}
if (step >= steps)
{
el.style.posLeft = 0
el.style.posTop = 0
currentElement++
step = 0
}
if(currentElement < animateElements.length)
window.setTimeout("animate();", speed)
}
//-->
</script>
<p dynamicanimation="flyBottom"
style="position: relative !important; left: 10000 !important"><font
color="#0000A0" size="48" face="Verdana,Arial"><strong>JavaOnline</strong></font></p>
<p dynamicanimation="flyTop"
style="position: relative !important; left: 10000 !important"><font
color="#0000FF" size="28" face="Verdana,Arial"><em><strong>Begendiniz
dimi</strong></em></font></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
Örnek: Örnegi görmek için tıklayın
30- Sayfana gelen kişi acaba sayfanda
kaç saniye durdu?
Tabii
bunu sen göremiyorsun sadece sayfana gelen kişi
görüyor. Bu gelen kişiye bir bilgi iste.
<body>
<table border="0">
<tr>
<td align="center"><font face="Arial"><strong>Benim sayfamda kaldığın süre:</strong></font></td>
<td align="center"><form name="d">
<p><input type="text" size="8" name="d2"></p>
</form>
</td>
<td align="center"><font face="Arial"><strong>saniye!</strong></font></td>
</tr>
</table>
<script>
<!--
var milisec=0
var seconds=0
document.d.d2.value='0'
function display(){
if (milisec>=9){
milisec=0
seconds+=1
}
else
milisec+=1
document.d.d2.value=seconds+"."+milisec
setTimeout("display()",100)
}
display()
//-->
</script>
</body>
Örnek: