جافا ـ شريط المهام
تاريخ ووقت ومعلومات
<!-- ONE STEP TO INSTALL DATE & TIME SCROLL: 1. Add the coding into the BODY of your HTML document --> <!-- STEP ONE: Copy this code into the BODY of your HTML document --> <BODY> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin var osd = " " osd +="This is yet another JavaScript Scroll example "; osd +="from the good folks at The JavaScript Source. "; osd +="This one has the date and time at the front."; osd +="Did you notice? It's coming around again, look! "; osd +=" "; var timer; var msg = ""; function scrollMaster () { msg = customDateSpring(new Date()) clearTimeout(timer) msg += " " + showtime() + " " + osd for (var i= 0; i < 100; i++){ msg = " " + msg; } scrollMe() } function scrollMe(){ window.status = msg; msg = msg.substring(1, msg.length) + msg.substring(0,1); timer = setTimeout("scrollMe()", 200); } function showtime (){ var now = new Date(); var hours= now.getHours(); var minutes= now.getMinutes(); var seconds= now.getSeconds(); var months= now.getMonth(); var dates= now.getDate(); var years= now.getYear(); var timeValue = "" timeValue += ((months >9) ? "" : " ") timeValue += ((dates >9) ? "" : " ") timeValue = ( months +1) timeValue +="/"+ dates timeValue +="/"+ years var ap="A.M." if (hours == 12) { ap = "P.M." } if (hours == 0) { hours = 12 } if(hours >= 13){ hours -= 12; ap="P.M." } var timeValue2 = " " + hours timeValue2 += ((minutes < 10) ? ":0":":") + minutes + " " + ap return timeValue2; } function MakeArray(n) { this.length = n return this } monthNames = new MakeArray(12) monthNames[1] = "Janurary" monthNames[2] = "February" monthNames[3] = "March" monthNames[4] = "April" monthNames[5] = "May" monthNames[6] = "June" monthNames[7] = "July" monthNames[8] = "August" monthNames[9] = "Sept." monthNames[10] = "Oct." monthNames[11] = "Nov." monthNames[12] = "Dec." daysNames = new MakeArray(7) daysNames[1] = "Sunday" daysNames[2] = "Monday" daysNames[3] = "Tuesday" daysNames[4] = "Wednesday" daysNames[5] = "Thursday" daysNames[6] = "Friday" daysNames[7] = "Saturday" function customDateSpring(oneDate) { var theDay = daysNames[oneDate.getDay() +1] var theDate =oneDate.getDate() var theMonth = monthNames[oneDate.getMonth() +1] var dayth="th" if ((theDate == 1) || (theDate == 21) || (theDate == 31)) { dayth="st"; } if ((theDate == 2) || (theDate ==22)) { dayth="nd"; } if ((theDate== 3) || (theDate == 23)) { dayth="rd"; } return theDay + ", " + theMonth + " " + theDate + dayth + "," } scrollMaster(); // End --> </SCRIPT>
ظهور حرف حرف في الشريط
<!-- TWO STEPS TO INSTALL ONE LETTER SCROLL: 1. Copy the coding into the HEAD of your HTML document 2. Add the onLoad event handler to the BODY tag --> <!-- STEP ONE: Add this code into the HEAD of your HTML document --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <!--Total Java Scripts 99 - Next Step Software--> <!-- Begin function scroll(jumpSpaces,position) { var msg = "Another JavaScript Example! Do you like it?" var out = "" if (killScroll) {return false} for (var i=0; i<position; i++){ out += msg.charAt(i)} for (i=1;i<jumpSpaces;i++) { out += " "} out += msg.charAt(position) window.status = out if (jumpSpaces <= 1) { position++ if (msg.charAt(position) == ' ') { position++ } jumpSpaces = 100-position } else if (jumpSpaces > 3) { jumpSpaces *= .75} else { jumpSpaces--} if (position != msg.length) { var cmd = "scroll(" + jumpSpaces + "," + position + ")"; scrollID = window.setTimeout(cmd,5); } else { scrolling = false return false} return true; } function startScroller() { if (scrolling) if (!confirm('Re-initialize snapIn?')) return false killScroll = true scrolling = true var killID = window.setTimeout('killScroll=false',6) scrollID = window.setTimeout('scroll(100,0)',10) return true } var scrollID = Object var scrolling = false var killScroll = false // End --> </SCRIPT> </HEAD> <!-- STEP TWO: Add the onLoad event handler to the BODY tag --> <BODY onLoad="startScroller()">
ظهور المعلومات في الشريط
<!-- TWO STEPS TO INSTALL WRITE AND SLIDE: 1. Paste the coding into the HEAD of your HTML document 2. Copy the onLoad event handler into the BODY tag --> <!-- STEP ONE: Copy this code into the HEAD of your HTML document --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin var Message="Yet another simple scroll from TJS! You could have done it!!"; var place=1; function scrollIn() { window.status=Message.substring(0, place); if (place >= Message.length) { place=1; window.setTimeout("scrollOut()",300); } else { place++; window.setTimeout("scrollIn()",50); } } function scrollOut() { window.status=Message.substring(place, Message.length); if (place >= Message.length) { place=1; window.setTimeout("scrollIn()", 100); } else { place++; window.setTimeout("scrollOut()", 50); } } // End --> </SCRIPT> <!-- STEP TWO: Add this onLoad event handler into the BODY tag --> <BODY onLoad="scrollIn()">
كلمات وعناوين متغيرة في الشريط العلوي
<script language="JavaScript"><!-- http://www.sahran.4mg.com var message1 = "www.uaezayed.com" var message2 = "www.yahoo.com" var delay = 5000 // Sets the delay between switching messages changer1(); function changer1() { ID = setTimeout("changer2()",delay); document.title = (message1); } function changer2() { ID = setTimeout("changer1()",delay); document.title = (message2); } // end hide // --></script>
عبارات مضيئة
<script language="JavaScript"> <!-- var x = 0 var speed = 300 var text = "www.sahran.4mg.com" function Blinky() { window.status = text setTimeout("Blinky2()", speed) } function Blinky2() { window.status = " " setTimeout("Blinky()", speed) } Blinky() </script>
عبارات بطريقة موجية
<script language="Javascript"> <!-- var text = "www.sahran.4mg.com" var speed = 200 var x = 0 function bb() { var a = text.substring(0,x) var b = text.substring(x,x+1).toUpperCase() var c = text.substring(x+1,text.length) window.status = a + b + c if (x == text.length) { x = 0 } else { x++ } setTimeout("bb()",speed) } bb(); </script>
عبارات ثابتة في شريط المهام
<body OnLoad="window.defaultStatus='مرحباً بكم في مواقع سهران ';" bgcolor="White" text="Black" link="Blue" vlink="Blue" alink="Blue">
عبارات مختلفه في شريط المهام
<html> <head> <script> message = new Array(5); message[0] = "www.sahran.4mg.com"; message[1] = "well come "; message[2] = "موقع سهران - دليل مواقع"; message[3] = "ارسل ايميل للاستفسار عن كل جديد"; message[4] = "sahran90@hotmail.com"; var showmsg = true; function nextMessage() { if (!showmsg) { window.setTimeout("nextMessage()",5000); showmsg = true; return; } index = Math.floor(message.length * Math.random()); window.status = message[index]; window.setTimeout("nextMessage()",5000); } nextMessage(); </script> <title></title> </head> <body bgcolor=#F0F0F0> </body> </html>