Форум поддержки Gund.ru

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.


Вы здесь » Форум поддержки Gund.ru » Дизайн форумов » Часы, таймеры, календари


Часы, таймеры, календари

Сообщений 1 страница 7 из 7

1

Часы, формат вывода 12:13:59

<html>
<head>
<title>Время.</title>
<script language="JavaScript">
<!--
ndata = new Date();
hours = ndata.getHours();
mins = ndata.getMinutes();
secs = ndata.getSeconds();
if (hours < 10) {hours = "0" + hours }
if (mins < 10) {mins = "0" + mins }
if (secs < 10) {secs = "0" + secs }
datastr = ( hours + ":" + mins + ":"+secs )
-->
</script>
</head>
<body>
<font face="Arial" size="3" color="#b00000">
<script language="JavaScript">
<!--
document.write(datastr);
-->
</script>
</font>
</body>
</html>

Дизайн Scriptic.

0

2

Часы в форме, формат вывода 12:13:59

<html>
<head>
<title>Время.</title>
</head>
<body onLoad="myclock()">
<script language="JavaScript">
<!--
function myclock()
{
ndata=new Date()
// Получение показаний часов, минут и секунд
hours= ndata.getHours();
mins= ndata.getMinutes();
secs= ndata.getSeconds();
// Дополнение показаний нулем слева
if (hours < 10) {hours = "0" + hours }
if (mins < 10) {mins = "0" + mins }
if (secs < 10) {secs = "0" + secs }
// Суммирование всех данных для вывода
datastr =hours+":" + mins+":" +secs
// Запись данных
document.clockexam.clock.value = " "+datastr;
// Вызов функции с интервалом 1000 ms
setTimeout("myclock()", 1000);
}
-->
</script>
<form name="clockexam"><input type="text" size="9" name="clock"></form>
</body>
</html>

Дизайн Scriptic.

0

3

Часы в бегущей строке поля формы.

<head>
<title>Часики в бегущей строке</title>
</head>
<script LANGUAGE="javascript">
var id 
var position=0
var numofloop=10
function banner()  {   
var nor = new Date()
var minutes = nor.getMinutes()
var hours = nor.getHours()
var seconds = nor.getSeconds()
var nortime = "В мнастоящий момент "
nortime += ((hours > 12) ? hours - 12 : hours)
nortime += ((minutes < 10) ? ":0" : ":") + minutes
nortime += ((seconds < 10) ? ":0" : ":") + seconds
nortime += (hours >= 12) ? " после полудня" : " до полудня"
var msg="                                        А знаете сколько сейчас времени?  " + nortime + "                                                 ";
var pace=10;
document.form.banner.value=msg.substring(position,position+75) ;
if  (position++==msg.length)  {
if  (numofloop-- < 2) return;
position=0;
}
id=setTimeout ("banner()", 1000/pace);
}
</script>
<body onload="banner()">
<form name="form">
<input type="text" name="banner" size="40">
</form>
</body>
</html>

Дизайн Scriptic.

0

4

Часы фоном. Можно менять размер, расположение и цветовую гамму часов.

<html>
<head>
<title>Часы фоном. Можно менять размер, расположение и цветовую гамму часов.</title>
</head>
<script language=javaScript>
<!--
function clockon() {
thistime= new Date()
var hours=thistime.getHours()
var minutes=thistime.getMinutes()
var seconds=thistime.getSeconds()
if (eval(hours) <10) {hours="0"+hours}
if (eval(minutes) < 10) {minutes="0"+minutes}
if (seconds < 10) {seconds="0"+seconds}
thistime = hours+":"+minutes+":"+seconds
 
if(document.all) {
  bgclocknoshade.innerHTML=thistime
  bgclockshade.innerHTML=thistime
}

if(document.layers) {
  document.bgclockshade.document.write('<div id="bgclockshade" style="position:absolute;visibility:visible;font-family:Verdana;color:FFAAAAA;font-size:120px;top:10px;left:12px">'+thistime+'</div>')
  document.bgclocknoshade.document.write('<div id="bgclocknoshade" style="position:absolute;visibility:visible;font-family:Verdana;color:DDDDDD;font-size:120px;top:10px;left:10px">'+thistime+'</div>')
  document.close()
}
var timer=setTimeout("clockon()",200)
}

// - End of JavaScript - -->
</script>
</head>
<body onLoad="">
<div id="bgclockshade" style="position:absolute; visibility:visible; font-family:Verdana; color:#006600; font-size:36px; top:10px; left:290px"></div>
<div id="bgclocknoshade" style="position:absolute; visibility:visible;font-family:Verdana; color:#009900; font-size:36px; top:9px; left:287px"></div>
<div id="mainbody" style="position:absolute; visibility:visible"></div>
</body>
</html>

Дизайн Scriptic.

0

5

Скрипт выводит время до события (праздника).

<html>
<head>
<title>Скрипт выводит время до события (праздника).</title>
<script language="JavaScript"><!--
function cntdown1(){
today = new Date()
nextEVENT = new Date("January 1, 3000")
msPerDay = 24 * 60 * 60 * 1000 ;daysLeft = (nextEVENT.getTime() - today.getTime()) / msPerDay;daysLeft = Math.round(daysLeft);document.write("До 3000 года осталось <FONT COLOR=\"#ffff00\">" + daysLeft + " дней(я)</FONT><br>") ;
minutesLeft=(nextEVENT.getTime() - today.getTime()) / 60000;
minutesLeft = Math.round(minutesLeft);
document.write("Или точнее <FONT COLOR=\"#ffff00\">" + minutesLeft + " минут(ы)</FONT>") ;
}//--></script>
</head>
<body>
<script>cntdown1()</script>
</body>
</html>

Дизайн Scriptic.

0

6

А у меня почемут не все часики идут....=(

0

7

А где календарики???

0


Вы здесь » Форум поддержки Gund.ru » Дизайн форумов » Часы, таймеры, календари