Chestii-tari - tutoriale,trucuri si distractie doar aici

Va rugam sa va logati pentru a putea cedea link-urile din post-uri!

Multumim

Chestii-tari.hitforum.ro va indeamna sa gasiti ceea ce cautati!

Creeaza-ti propriul server de ikariam ,gladiatus ,triburile sau travian...mai multe informatii gasiti pe acest forum! Have a Smile) day!

    Data si timp

    Distribuiţi
    avatar
    Admin
    Admin

    Mesaje : 215
    galbeni : 603
    Reputatie : 0
    Data de inscriere : 17/11/2011

    Data si timp

    Mesaj  Admin la data de Joi Iun 07, 2012 7:46 am

    Millennium Countdown

    In a Nutshell: Let your visitors know exactly how much time remains until the dawn of the new Millennium with this accurate Javascript countdown clock. Whether it is to warn your audience of the impending Y2K bug, or used as a countdown to what is expected to be the biggest global party on record, this script makes a worthwhile addition to any site. (Note also the fact that the countdown is reflected in your browser's status bar, below.)



    Use it Yourself: Quite a simple script to implement, the Millennium Countdown is comprised of two sections. The first, which is the actual script that drives the clock, follows. This should be pasted within the <head> section of your HTML code.

    Cod:
    <SCRIPT LANGUAGE="JavaScript"> <!-- This Script Created by Tomer Shiran and Yehuda Shiran --> <!-- For this and 100s of other Free Javascripts, check out: --> <!-- Free-Javascripts.com @ http://www.free-javascripts.com/ --> var Temp2; var timerID = null; var timerRunning = false; function showtime() { now = new Date(); var CurHour = now.getHours(); var CurMinute = now.getMinutes(); var CurMonth = now.getMonth(); var CurDate = now.getDate(); var CurYear = now.getYear(); var CurSecond = now.getSeconds(); now = null; Hourleft = 23 - CurHour Minuteleft = 59 - CurMinute Secondleft = 59 - CurSecond var Yearleft = 99 - CurYear var Monthleft = 11 - CurMonth var Dateleft = 31 - CurDate if (Yearleft!=1) {var ys="s"} else {var ys=""}; if (Monthleft!=1) {var mos="s"} else {var mos=""} if (Dateleft!=1) {var ds="s"} else {var ds=""} if (Hourleft!=1) {var hs="s"} else {var hs=""} if (Minuteleft!=1) {var mis="s"} else {var mis=""} if (Secondleft!=1) {var ss="s"} else {var ss=""} Temp2='Still '+Yearleft+' year'+ys+', '+Monthleft+' month'+mos+', '+Dateleft+' day'+ds+', '+Hourleft+' hour'+hs+', '+Minuteleft+' minute'+mis+', '+Secondleft+' second'+ss+' left until the dawn of the new Millennium! ' Temp3=Yearleft+' year'+ys+', '+Monthleft+' month'+mos+', '+Dateleft+' day'+ds+', '+Hourleft+' hour'+hs+', '+Minuteleft+' minute'+mis+', '+Secondleft+' second'+ss window.status=Temp2; document.frm.left.value=Temp3; timerID = setTimeout("showtime()",1000); timerRunning = true; } var timerID = null; var timerRunning = false; function stopclock () { if(timerRunning) clearTimeout(timerID); timerRunning = false; } function startclock () { // Make sure the clock is stopped stopclock(); showtime(); } // --> </script>

    The second portion contains instructions for initialising and displaying the counter. Place the onload command within your actual <body> tag, and the form (which can be removed from the table if desired) where desired.
    Cod:

    <body onLoad="startclock()"> <TABLE BORDER="4" CELLPADDING="2"> <form name="frm"> <TR><TD><b> <div align="center" align="middle"> <input type="textarea" name="left" size="60" value="Initialising Countdown..."> </div> </b></TD></TR></form></table>




    Monthly Calendar


    In a Nutshell: Keep up-to-date with this dynamic monthly calendar, designed by Randy Bennett. Utilising Javascript technology, the calendar updates itself, highlighting the current month and date for ease of reference. Hey, not everyone knows what day it is - especially self-confessed Web addicts such as myself!



    Use it Yourself: Copy and paste the text from below into the <body> section of your page, and you'll never lose track of a week again!

    Cod:
    <SCRIPT language="javascript"> <!-- This Script Created by Randy Bennett: http://home.thezone.net/~rbennett/utility/javahead.htm --> <!-- For this and 100s of other Free Javascripts, check out: --> <!-- Free-Javascripts.com @ http://www.free-javascripts.com/ --> function getmon(m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11) { this[0] = m0; this[1] = m1; this[2] = m2; this[3] = m3; this[4] = m4; this[5] = m5; this[6] = m6; this[7] = m7; this[8] = m8; this[9] = m9; this[10] = m10; this[11] = m11; } function calendar() { var monthNames = "JanFebMarAprMayJunJulAugSepOctNovDec"; var today = new Date(); var thisDay; var monthDays = new getmon(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); year = today.getYear() + 1900; thisDay = today.getDate(); if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) monthDays[1] = 29; nDays = monthDays[today.getMonth()]; firstDay = today; firstDay.setDate(1); startDay = firstDay.getDay(); document.writeln("<div align="center">"); document.write("<table border=3 cellpadding=1>"); document.write("<tr><th colspan=7><font size=+2>"); document.write(monthNames.substring(today.getMonth() * 3, (today.getMonth() + 1) * 3)); document.write(". "); document.write(year); document.write("<tr><th>"); document.write("Sun<th>Mon<th>Tue<th>Wed<th>Thu<th>Fri<th>Sat"); document.write("<tr>"); column = 0; for (i=0; i<startDay; i++) { document.write("<td align=center><font size+=3>"); column++; document.write("</font>"); } for (i=1; i<=nDays; i++) { document.write("<td align=center>"); if (i == thisDay) document.write("<font color=\"#FFd700\" size+=3><b>") document.write(i); if (i == thisDay) document.write("</font></b>") column++; if (column == 7) { document.write("<tr>"); column = 0; } } document.write("</table>"); } calendar(); document.write(); function shutdown(){ window.close() } // --></SCRIPT>



    Simple Clock

    In a Nutshell: This basic script generates a simple clock that can be integrated into one's site to present a constant real-time element, and to discourage procrastination! ;-).


    The current time is:

    Use it Yourself: Simple Clock requires only that the following is added to the <body> section of your page, where appropriate, remembering to include the onload command within your <body> tag (as shown below).

    Cod:
    <body onLoad="startclock()"> <script Language="JavaScript"> <!-- This Script Created by Randy Bennett: http://home.thezone.net/~rbennett/utility/javahead.htm --> <!-- For this and 100s of other Free Javascripts, check out: --> <!-- Free-Javascripts.com @ http://www.free-javascripts.com/ --> <!-- Begin var timerID = null; var timerRunning = false; function stopclock (){ if(timerRunning) clearTimeout(timerID); timerRunning = false; } function showtime () { var now = new Date(); var hours = now.getHours(); var minutes = now.getMinutes(); var seconds = now.getSeconds() var timeValue = "" + ((hours >12) ? hours -12 :hours) //I added the following line to see if i could get 9 hours to show as 09 hours timeValue = ((timeValue <10)? "0":"") + timeValue timeValue += ((minutes < 10) ? ":0" : ":") + minutes timeValue += ((seconds < 10) ? ":0" : ":") + seconds timeValue += (hours >= 12) ? " pm" : " am" document.clock.face.value = timeValue; timerID = setTimeout("showtime()",100); timerRunning = true; } function startclock() { stopclock(); showtime(); } // End --> </SCRIPT> <br><br> <div align="center"><B><FONT COLOR="#FFFFFF">The current time is:</FONT></B></div><br><br> <div align="center"> <FORM name="clock"> <input type="text" name="face" size=11 value=""> </FORM> </div>

      Subiecte similare

      -

      Acum este: Sam Oct 20, 2018 8:42 am