• Loading...
Sign in to follow this  
Guest YuxusuZ

Yeni ilə qalan vaxt

Recommended Posts

Guest YuxusuZ

Hər kəsə salam. Son zamanlar bəzi saytlarda mod olan bir skripti paylaşmaq istəyirəm. Bu skripti çox adam bilir. Bilməyənlər üçün paylaşıram. Bu, yeni ilə qalan vaxtı göstərən skriptdir.

Buyurun:

<script LANGUAGE="javascript">

document.write('<span id="ny_date">Yeni Il</span>')

function ojidanieNG()

{

var today = new Date();

 

var BigDay = new Date("January 1, 2013");

var timeLeft = (BigDay.getTime() - today.getTime());

 

var e_daysLeft = timeLeft / 86400000;

var daysLeft = Math.floor(e_daysLeft);

 

var e_hrsLeft = (e_daysLeft - daysLeft)*24;

var hrsLeft = Math.floor(e_hrsLeft);

 

var e_minsLeft = (e_hrsLeft - hrsLeft)*60;

var minsLeft = Math.floor(e_minsLeft);

 

var seksLeft = Math.floor((e_minsLeft - minsLeft)*60);

 

if (BigDay.getTime() > today.getTime() )

document.getElementById("ny_date").innerHTML = '<font color=red>Yeni İlə Qalan Vaxt</font>: '+daysLeft+' Gün, '+hrsLeft+' Saat, '+minsLeft+' dəqiqə, '+seksLeft+' Saniyə'

else

document.getElementById("ny_date").innerHTML = '<font color=red>Xoş gəldin 2013</font>!!!'

}

setInterval("ojidanieNG()", 50)

</SCRIPT>

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • loading...