Здорово,чувак! Добро пожаловать! Вы попали на сайт программистов из Караганды  

Главное меню
·  Главная
·  форум
· гостевая книга
·  проги
·  глюки
·  шпаргалки
·  фишки
·  Java-cкрипты
·  видео
·  написать письмо
·  редактор сайта
Информация
Сайт по информатике

Сайт Кодеров


скачать эти скрипты

Скрипты даты и времени

1

<html>

<head>

<title>скрипт даты и времени</title>

<META http-equiv="Content-Type" content="text/html; charset=windows-1251">

<Style>

A:Link{ Color: #000000; Text-decoration: underline}

A:Visited{ Color: #000000; Text-decoration: underline}

A:Hover{ Color: #000000; Text-decoration: none}

td, body {font-family: verdana, arial, helvetica; font-size:11px;} 

</Style>

</head>

<body bgcolor="#EDEDED" text="#000000" link="#000000" topmargin="0" leftmargin="0">

<center>

<SCRIPT LANGUAGE="JavaScript">

var now = new Date();

var hours = now.getHours();

var minutes = now.getMinutes();

var timeValue = "" + ((hours >12) ? hours -12 :hours)

timeValue += ((minutes < 10) ? ":0" : ":") + minutes

timeValue += (hours >= 12) ? " P.M." : " A.M."

timerRunning = true;

mydate = new Date();

myday = mydate.getDay();

mymonth = mydate.getMonth();

myweekday= mydate.getDate();

weekday= myweekday;

myyear= mydate.getYear();

year = myyear

if(myday == 0)

day = " Sunday, "     

else if(myday == 1)

day = " Monday, "

else if(myday == 2)

day = " Tuesday, "  

else if(myday == 3)

day = " Wednesday, "  

else if(myday == 4)

day = " Thursday, "

else if(myday == 5)

day = " Friday, "

else if(myday == 6)

day = " Saturday, "

if(mymonth == 0)

month = "January "

else if(mymonth ==1)

month = "February "

else if(mymonth ==2)

month = "March "

else if(mymonth ==3)

month = "April "

else if(mymonth ==4)

month = "May "

else if(mymonth ==5)

month = "June "

else if(mymonth ==6)

month = "July "

else if(mymonth ==7)

month = "August "

else if(mymonth ==8)

month = "September "

else if(mymonth ==9)

month = "October "

else if(mymonth ==10)

month = "November "

else if(mymonth ==11)

month = "December"

document.write("<B><P ALIGN=RIGHT><FONT SIZE=-1 FACE=VERDANA,ARIAL>" + timeValue + " | " +day + month);

document.write(myweekday+","+ " " + year + "</FONT></B><BR><HR WIDTH=300 ALIGN=RIGHT><P>");

</SCRIPT>

</html>

2

<html>

<head>

<title>скрипт даты и времени</title>

<META http-equiv="Content-Type" content="text/html; charset=windows-1251">

<Style>

A:Link{ Color: #000000; Text-decoration: underline}

A:Visited{ Color: #000000; Text-decoration: underline}

A:Hover{ Color: #000000; Text-decoration: none}

td, body {font-family: verdana, arial, helvetica; font-size:11px;} 

</Style>

</head>

<body bgcolor="#EDEDED" text="#000000" link="#000000" topmargin="0" leftmargin="0">

<center>

<script language="JavaScript">

<!-- hide script from old browsers

function process(){}

today = new Date()

if(today.getMinutes() < 10) {

pad = "0"}

else

pad = "";

document.write("<center><FONT SIZE=4 color=black>ваш текст</FONT></center>")

if((today.getHours() < 12) && (today.getHours() >= 6))

{  document.write("<center><FONT SIZE=4 color=blue>Good Morning</FONT></center>")}

if((today.getHours() >= 12) && (today.getHours() < 18))

{  document.write("<center><FONT SIZE=4 color=blue>Good Afternoon</FONT></center>")}

if((today.getHours() >= 18) && (today.getHours() <= 23))

{  document.write("<center><FONT SIZE=4 color=blue>Good Evening</FONT></center>")}

if((today.getHours() >= 0) && (today.getHours() < 4))

{  document.write("<center><FONT SIZE=4 color=blue>You're up late today.</FONT></center>")}

if((today.getHours() >= 4) && (today.getHours() <= 6))

{  document.write("<center><FONT SIZE=4 color=blue>Wow! You are up early!!</FONT></center>")}

document.write("<center><FONT SIZE=3 color=red>Time: ",today.getHours(),":",pad,today.getMinutes())

document.write("  Date: ",today.getMonth()+1,"/",today.getDate(),"/",today.getYear(),"<br></font></center>");

// end hiding contents -->

</script>

</html>

3

<HTML><HEAD><TITLE>скрипт даты</TITLE>

<link rel="stylesheet" href="style.css" type="text/css">

<script language="JavaScript">

<!--

now = new Date();

function print_date()

{ var day = now.getDay();

var dayname;

if (day==0)dayname="Воскресенье";

if (day==1)dayname="Понедельник";

if (day==2)dayname="Вторник";

if (day==3)dayname="Среда";

if (day==4)dayname="Четверг";

if (day==5)dayname="Пятница";

if (day==6)dayname="Суббота";

var monthNames = new Array("Января", "Февраля", "Марта", "Апреля", "Мая", "Июня", "Июля", "Августа", "Сентября",

"Октября", "Ноября", "Декабря");

var month = now.getMonth();

var monthName = monthNames[month];

var year = now.getYear();

if ( year < 1000 ) year += 1900;

var datestring = dayname + ', ' + now.getDate() + ' ' + monthName + ', ' + year;

document.write('<NOBR> ' + datestring + '</NOBR>');

}

//-->

</script>

</HEAD>

<BODY>

<CENTER><B>Дата на странице</B><BR><BR>

<script language="JavaScript">

<!--

print_date();

//-->

</script>

</CENTER>

</BODY></HTML>

4

<html><head><title>скрипт даты</title>

<META http-equiv="Content-Type" content="text/html; charset=windows-1251">

<Style>

A:Link{ Color: #000000; Text-decoration: underline}

A:Visited{ Color: #000000; Text-decoration: underline}

A:Hover{ Color: #000000; Text-decoration: none}

td, body {font-family: verdana, arial, helvetica; font-size:11px;} 

</Style>

</head>

<body bgcolor="#EDEDED" text="#000000" link="#000000" topmargin="0" leftmargin="0">

<center>

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

var months=new Array(13);

months[1]="January";

months[2]="February";

months[3]="March";

months[4]="April";

months[5]="May";

months[6]="June";

months[7]="July";

months[8]="August";

months[9]="September";

months[10]="October";

months[11]="November";

months[12]="December";

var time=new Date();

var lmonth=months[time.getMonth() + 1];

var date=time.getDate();

var year=time.getYear();

if (year<100) year="19" + time.getYear();

else year=time.getYear();

document.write("<P ALIGN=RIGHT>" + date + " ");

document.write(lmonth + " " + year + "&nbsp;");

// End -->

</SCRIPT></html>

Автор не несет никакой ответственности за испорченное программное обеспечение и другие возможные осложнения при использовании этих скриптов.



Web site engine's code is Copyright © 2007 by Sjava Программисты. All Rights Reserved.
Hosted by uCoz