جافا ـ خلفيات
عدة صور للخلفية
<!-- FOUR STEPS TO INSTALL RANDOM IMAGES: 1. Paste the first code into the HEAD of your HTML document 2. Add the onLoad event handler to the BODY tag 3. Place the last script in the BODY of your HTML document 4. Save the 7 background images to your directory --> <!-- STEP ONE: Paste this code into HEAD of your document --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> today=new Date(); jran=today.getTime(); var number = 7; var random_number=""; var image=""; var text_color=""; ia=9301; ic=49297; im=233280; jran = (jran*ia+ic) % im; random_number = Math.ceil( (jran/(im*1.0)) *number); // Loads the appropriate image and text color based on random number. if (random_number==1) { text_color="000000"; image="1.JPG"; } if (random_number==2) { text_color="000000"; image="2.JPG"; } if (random_number==3) { text_color="000000"; image="3.JPG"; } if (random_number==4) { text_color="000000"; image="4.JPG"; } if (random_number==5) { text_color="000000"; image="5.JPG"; } if (random_number==6) { text_color="000000"; image="6.JPG"; } if (random_number==7) { text_color="000000"; image="7.JPG"; } // End --> </SCRIPT> </HEAD> <!-- STEP TWO: Add this onLoad event handler to the BODY tag --> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin document.open(); document.write("<BODY BACKGROUND='"+image+"' TEXT='"+text_color+"'>"); document.write("<CENTER></CENTER>"); // End --> </SCRIPT> <!-- STEP THREE: Place this script in the BODY of the HTML document --> <BODY> <FORM> <INPUT TYPE="button" VALUE="Reload Page" onClick="window.location='r-images.html'"> </FORM> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin document.write("<CENTER>Background Image: <FONT SIZE=-1>("+image+")</FONT></CENTER>"); // End --> </SCRIPT>
يحرك الصفحه من الاعلى للاسفل
<script language="JavaScript1.2"> //change 1 to another integer to alter the scroll speed. Greater is faster var speed=1 var currentpos=0,alt=1,curpos1=0,curpos2=-1 function initialize(){ startit() } function scrollwindow(){ if (document.all) temp=document.body.scrollTop else temp=window.pageYOffset if (alt==0) alt=1 else alt=0 if (alt==0) curpos1=temp else curpos2=temp if (curpos1!=curpos2){ if (document.all) currentpos=document.body.scrollTop+speed else currentpos=window.pageYOffset+speed window.scroll(0,currentpos) } else{ currentpos=30 window.scroll(0,currentpos) } } function startit(){ setInterval("scrollwindow()",30) } window.onload=initialize </script>
يفتح الشاشة بكاملها
<HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function fullScreen(theURL) { window.open(theURL, '', 'fullscreen=yes, scrollbars=auto'); } // End --> </script> </HEAD> <BODY> <a href="javascript:void(0);" onClick="fullScreen('index.html');">صفحة سهران</a> </BODY>
اطار حول الصفحة
<script language="JavaScript1.2"> if (document.all) document.body.style.cssText="border:25 ridge red" </script>
أخفاء الاطارات
<!-- just add the following to the <BODY> tag of your page. see the example --> <body scroll="no" border="no" style="border-style: groove; border-width: 0" >
اهتزاز الشاشة
Copy and paste the script between the <head> tags of your web page. <SCRIPT LANGUAGE="JavaScript1.2"> <!--- bName = navigator.appName; bVer = parseInt(navigator.appVersion); if (bName == "Netscape" && bVer == 3) ver = "n3"; else if (bName == "Netscape" && bVer == 2) ver = "n2"; else if (bName == "Netscape" && bVer >= 4) ver = "n4"; else if (bName == "Microsoft Internet Explorer" && bVer == 2) ver = "e3"; else if (bName == "Microsoft Internet Explorer" && bVer > 2) ver = "e4"; if (navigator.appVersion.indexOf("Mac") != -1) ver+="m"; function shake() { if (ver == "n4" || ver == "n4m" || ver == "e4" || ver == "e4m") { for (i = 10; i > 0; i--) { for (z = 4; z > 0; z--) { self.moveBy(0,i); self.moveBy(i,0); self.moveBy(0,-i); self.moveBy(-i,0); } } } } setTimeout('shake()',1000); // ---> </SCRIPT>
خاصية البحث في الصفحة
<html> <!-- TWO STEPS TO INSTALL FIND IN PAGE: 1. Copy the coding into the HEAD of your HTML document 2. Add the last code into the BODY of your HTML document --> <!-- STEP ONE: Paste this code into the HEAD of your HTML document --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin var NS4 = (document.layers); var IE4 = (document.all); var win = this; var n = 0; function findInPage(str) { var txt, i, found; if (str == "") return false; if (NS4) { if (!win.find(str)) while(win.find(str, false, true)) n++; else n++; if (n == 0) alert(str + " was not found on this page."); } if (IE4) { txt = win.document.body.createTextRange(); for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) { txt.moveStart("character", 1); txt.moveEnd("textedit"); } if (found) { txt.moveStart("character", -1); txt.findText(str); txt.select(); txt.scrollIntoView(); n++; } else { if (n > 0) { n = 0; findInPage(str); } else alert(str + " was not found on this page."); } } return false; } // End --> </script> </HEAD> <BODY> <form name=search onSubmit="return findInPage(this.string.value);"> CE?E ?? C????? <input name=string type=text size=15 onChange="n = 0;"> </form> <p><center> </center><p> </html>
جمله ترافقك من اعلى الشاشه لاسفلها
<HTML> <HEAD> <TITLE>Floating Menu</TITLE> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin // Instructions: // This is a fairly simple code to get running. There are // a few things that you need to do, however. First, you // need to set a value for the setTimeout() method near the // bottom of the code. Don't forget to add the onLoad event // handler to the <BODY> tag. Then go take a look down below // the <BODY> tag. You'll have to change a couple values for // the <DIV> tag. Those values are "left:10px" and "top:10px". // The value for left defines how many pixels that floating // stuff should be from the left edge of the screen, and // the value for top is the number of pixels the stuff should // be from the top edge. The final thing you have to do in this // code is tell it what to float. Typically, this would be // a table or image, acting as a navigational menu. But, whatever // you place between the <DIV>...</DIV> tags will float. // I commented out various lines below to help the script's // readibility. If you have any problems, please e-mail me at: // jmornin@gateway.net. // Good Luck! // First, declare the variables var mover = null var object = "menu" // Check if browser is Netscape. If it is, assign a certain value to "mover" if (navigator.appName.indexOf("Netscape") != -1) { var mover = "document.menu.top = window.pageYOffset" } // If the browser is not Netscape, assign a different value to "mover" else { var mover = "menu.style.pixelTop = document.body.scrollTop" } // Now the function function check() { object = "menu" eval(mover) setTimeout("check()", 10) // The number after "check()" is in milliseconds (lower number = less lag time) } // End of the code --> </SCRIPT> </HEAD> <BODY onLoad="check()"> <!-- Here's the div tag; refer to the instructions at the top for more info --> <DIV id="menu" style="position:absolute; visibility:show; left:10px; top:10px; z-index:0"> www.sahran.4mg.com </div> <br><br><br><br> <br> <br> <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> </BODY> </html>
خلفيه ملونه
<body> <script language="Javascript"> <!-- This script and many more are available online free at --> <!-- The JavaScript Source!! http://javascript.internet.com --> <!-- Begin var COLOR = 999999 var woot = 0 function stoploop() { document.bgColor = '#000000'; clearTimeout(loopID); } function loopBackground() { if (COLOR > 0) { document.bgColor = '#' + COLOR COLOR -= 111111 loopID = setTimeout("loopBackground()",1) } else { document.bgColor = '#000000' woot += 10 COLOR = 999999 COLOR -= woot loopID = setTimeout("loopBackground()",1) } } // End --> </script> <p> </p> <p> </p> <p> </p> <p> </p> <form name="background"> <p align="center"><input type="button" value="اضغط لخلفية ملونه" onclick="loopBackground()" style="font-weight: bold"> <br> <input type="button" value="وقف الخلفيه الملونه" onclick="stoploop()" style="font-weight: bold"> </p> </form> </body>
خلفية متحركة
<HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin var isNS = ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 4)); var _all = ''; var _style = ''; var wwidth, wheight; var ydir = '++'; var xdir = '++'; var id1, id2, id3; var x = 1; var y = 1; var x1, y1; if(!isNS) { _all='all.'; _style='.style'; } function getwindowsize() { clearTimeout(id1); clearTimeout(id2); clearTimeout(id3); if (isNS) { wwidth = window.innerWidth - 55; wheight = window.innerHeight - 50; } else { wwidth = document.body.clientWidth - 55; wheight = document.body.clientHeight - 50; } id3 = setTimeout('randomdir()', 20000); animate(); } function randomdir() { if (Math.floor(Math.random()*2)) { (Math.floor(Math.random()*2)) ? xdir='--': xdir='++'; } else { (Math.floor(Math.random()*2)) ? ydir='--': ydir='++'; } id2 = setTimeout('randomdir()', 20000); } function animate() { eval('x'+xdir); eval('y'+ydir); if (isNS) { pic1.moveTo((x+pageXOffset),(y+pageYOffset)) } else { pic1.pixelLeft = x+document.body.scrollLeft; pic1.pixelTop = y+document.body.scrollTop; } if (isNS) { if (pic1.top <= 5+pageYOffset) ydir = '++'; if (pic1.top >= wheight+pageYOffset) ydir = '--'; if (pic1.left >= wwidth+pageXOffset) xdir = '--'; if (pic1.left <= 5+pageXOffset) xdir = '++'; } else { if (pic1.pixelTop <= 5+document.body.scrollTop) ydir = '++'; if (pic1.pixelTop >= wheight+document.body.scrollTop) ydir = '--'; if (pic1.pixelLeft >= wwidth+document.body.scrollLeft) xdir = '--'; if (pic1.pixelLeft <= 5+document.body.scrollLeft) xdir = '++'; } id1 = setTimeout('animate()', 30); } // End --> </script> </HEAD> <BODY OnLoad="getwindowsize()" OnResize="getwindowsize()" background="هنا تضع اسم ملف الصوره"> <div id="pic1" style="position:absolute; visibility:visible; left:0px; top:0px; z-index:-1"> <img src="alien.gif" border="0"> </div> <script language="javascript"> var pic1=eval('document.'+_all+'pic1'+_style); </script>