Countdown lazımdır.

Mənə countdown lazımdır.layihəmdə istifadə edəcəm.Qeyd olunan vaxt geri getsin və 00:00:00 olanda müəyyən əməliyyat yerinə yetirilsin.Əslində mən birini qurmuşam ama səhifəni yenilədikcə vaxt başdan başlıyır.Əvvəlcədən təşəkkürlər.


Yadda saxlama
Kateqoriya: Web skriptlər, kod həlləri . . Qısa keçid.

Verilmiş cavablar və yazılan şərhlər (8 cavab var)

(17:08, 06/03/2012 ) #10187

Salam. Siz kodda bəzi dəyişikliklər etməlisiniz bunun üçün. İstəsəniz ünvanı verin, baxaq

Cavablamaq üçün sağ sütundan hesaba daxil olmaq lazımdır

(22:34, 06/03/2012 ) #10196

Hele ki localhostdadi.ama kodlari ataram bura baxarsiz.

Cavablamaq üçün sağ sütundan hesaba daxil olmaq lazımdır

(22:35, 06/03/2012 ) #10197

index.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="style.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="c.js"></script> 


</head>
<body>

 <span>Butik Kapanış :</span>

                <h1 id="boutiqueCloseCountDown6932"></h1>

                

                <script language="javascript" type="text/javascript"> 


 var boutiqueCloseCountDown6932 = new countdown('boutiqueCloseCountDown6932'); 
 boutiqueCloseCountDown6932.Div = "boutiqueCloseCountDown6932" ;
 boutiqueCloseCountDown6932.Prefix = "" ;
 boutiqueCloseCountDown6932.CurrentDate = "02/25/2012 17:11:17" ;
 boutiqueCloseCountDown6932.TargetDate = "02/29/2012 10:30:00" ;
 boutiqueCloseCountDown6932.Setup();
 </script> 




</body>
</html>
Cavablamaq üçün sağ sütundan hesaba daxil olmaq lazımdır

(22:36, 06/03/2012 ) #10198

c.js

function countdown(obj) {
    this.obj = obj;
    this.Div = "clock";
    this.BackColor = "white";
    this.ForeColor = "black";
    this.CurrentDate = "12/31/2020 5:00:00 AM"; //rramaiah: pass in current date (down to the second) so that it can be set by server
    this.TargetDate = "12/31/2020 5:00 AM";
    this.DisplayFormat = "%%D%% gün %%H%%:%%M%%:%%S%%";
    this.CountActive = true;
    this.Prefix = "";
    this.DisplayStr;

    this.Calcage = cd_Calcage;
    this.CountBack = cd_CountBack;
    this.Setup = cd_Setup;
}

function cd_Calcage(secs, num1, num2, compact) //rramaiah: "compact" means do not pad with zeros
{
    s = ((Math.floor(secs / num1)) % num2).toString();
    if (!compact) {
        if (s.length < 2) s = "0" + s;
    }
    return (s);
}
function cd_CountBack(secs) {
    if (secs <= 0) {
        this.CountActive = false;
        this.DisplayStr = '';

        if (window.location.toString().indexOf("Basket", 0) > 0) {
            //mdernek --BasketService ile senkron değildi. Serviste ürün olduğu halde burası 0 olup redirect oluyordu. Loopa giriyordu. Kaldırıldı. 16.12.2010 16:42
            //window.location = window.location + "?msg=timeout" ;
        }
    }
    else {
        var days = this.Calcage(secs, 86400, 100000, true); //rramaiah: do not pad days with zeros
        this.DisplayStr = this.Prefix + " " + this.DisplayFormat.replace(/%%D%%/g, days);
        if (days == 1) { //rramaiah: if days is 1, replace "Days" with "Day"
            this.DisplayStr = this.DisplayStr.replace(/Days/g, 'gün');
        }
        this.DisplayStr = this.DisplayStr.replace(/%%H%%/g, this.Calcage(secs, 3600, 24));
        this.DisplayStr = this.DisplayStr.replace(/%%M%%/g, this.Calcage(secs, 60, 60));
        this.DisplayStr = this.DisplayStr.replace(/%%S%%/g, this.Calcage(secs, 1, 60));
    }

    var tmpDiv = document.getElementById(this.Div);
    if (tmpDiv) tmpDiv.innerHTML = this.DisplayStr;
    if (this.CountActive) setTimeout("if (" + this.obj + ") " + this.obj + ".CountBack(" + (secs - 1) + ")", 990);
}
function cd_Setup() {
    var dthen = new Date(this.TargetDate);
    var dnow = new Date(this.CurrentDate);
    ddiff = new Date(dthen - dnow);
    gsecs = Math.floor(ddiff.valueOf() / 1000);
    this.CountBack(gsecs);
}

function myCd(bas, bit, myid) {
    var myGCD = new countdown(myid);
    myGCD.Div = myid;
    myGCD.Prefix = "";
    myGCD.CurrentDate = bas;
    myGCD.TargetDate = bit;
    myGCD.Setup();
}
Cavablamaq üçün sağ sütundan hesaba daxil olmaq lazımdır

(22:37, 06/03/2012 ) #10199
$(function(){
	
	var note = $('#note'),
		ts = new Date(2012, 0, 1),
		newYear = true;
	
	if((new Date()) > ts){
		// The new year is here! Count towards something else.
		// Notice the *1000 at the end - time must be in milliseconds
		ts = (new Date()).getTime() + 50*24*60*60*1000;
		newYear = false;
	}
		
	$('#countdown').countdown({
		timestamp	: ts,
		callback	: function(days, hours, minutes, seconds){
			
			var message = "";
			
			message += days + " day" + ( days==1 ? '':'s' ) + ", ";
			message += hours + " hour" + ( hours==1 ? '':'s' ) + ", ";
			message += minutes + " minute" + ( minutes==1 ? '':'s' ) + " and ";
			message += seconds + " second" + ( seconds==1 ? '':'s' ) + " <br />";
			
			if(newYear){
				message += "left until the new year!";
			}
			else {
				message += "left to 10 days from now!";
			}
			
			note.html(message);
		}
	});
	
});
Cavablamaq üçün sağ sütundan hesaba daxil olmaq lazımdır

(22:38, 06/03/2012 ) #10200

Bu isimi gore biler.ama ki sehife yenilendikce vaxt basdan basliyir .problem budu

Cavablamaq üçün sağ sütundan hesaba daxil olmaq lazımdır

(13:54, 09/03/2012 ) #10373

boutiqueCloseCountDown6932.CurrentDate = “02/25/2012 17:11:17” ;
boutiqueCloseCountDown6932.TargetDate = “02/29/2012 10:30:00” ;
Bunları dəyişmək lazımdır, TargetDate-ə hansı vaxt hədəfdir onu yazın. Currentdate-in qiymətinsə silin, əvəzinə
burdakı funksiyalardan istifadə edib dəyişən ilə qiymət mənimsədin. Javascriptdən bilginiz varsa, çox asandır, yoxdursa, gərək bir az öyrənəsiniz 🙂

Cavablamaq üçün sağ sütundan hesaba daxil olmaq lazımdır

(20:18, 09/03/2012 ) #10385

JS dan biliyim az oldugunnan bacara bilmedim 🙁
Burda sehife yenilendikce vaxtin basdan baslamamasi ucun ne etmek lazimdi?

Cavablamaq üçün sağ sütundan hesaba daxil olmaq lazımdır

Bu suala aid öz sualım var:
Sual verin
Bu suala cavab vermək istəyirəm:
Cavab verin

Cavab verin


Cavab yazmaq üçün lütfən sağ sütundan və ya buradan hesaba daxil olun.

Üzvlər üçün giriş

Qeydiyyat

Elan qutusu

Son cavablar və şərhlər

Software Developer cavab verdi - Rus dilindən mətni tərcümə etmək (10 saat əvvəl)

Cənab cavab verdi - Almanca söz bazası yığmaq (3 gün əvvəl)

rdrobert cavab verdi - Mikrofon süngərinə yazı (4 gün əvvəl)

rdrobert cavab verdi - Yerli virtual olaraq dost tapmaq platforması (4 gün əvvəl)

rdrobert cavab verdi - Almanca söz bazası yığmaq (4 gün əvvəl)

rdrobert cavab verdi - Playstation 4 almaq, Playsation klub açmaq (4 gün əvvəl)

rdrobert cavab verdi - Proqramistin ixtsasi hansidir? (4 gün əvvəl)

Software Developer cavab verdi - Azercell Kabinetim aplikasiyasında İstəSən tarifi haqqında (5 gün əvvəl)

Software Developer cavab verdi - Proqramistin ixtsasi hansidir? (5 gün əvvəl)

byshako cavab verdi - Google Azərbaycan nömrələrini qəbul etmir (16 gün əvvəl)

rdrobert cavab verdi - Honeygain, passiv gelir (17 gün əvvəl)

rdrobert cavab verdi - Xaricdən telefon getirmek (17 gün əvvəl)

rdrobert cavab verdi - Google Azərbaycan nömrələrini qəbul etmir (17 gün əvvəl)

rdrobert cavab verdi - AliExpress, Telefon, Rüsum (17 gün əvvəl)

MiMov cavab verdi - Özəl ip tv qurmaq (25 gün əvvəl)

Software Developer - 615 xal

E. Hacı - 607 xal

Onar Alili - 526 xal

Dilsuz - 448 xal

Cabbarov Sübhan - 434 xal

Maqa - 346 xal

Ruslan Butdayev - 328 xal

Namiq Bəndəli - 297 xal

U.Tarlan - 244 xal

Meherremoff - 234 xal

Sistemə daxil olmuş 23234 sualdan 92%-dən çoxu cavablandırılmışdır.

Proyekt haqqında

E-Haci.net istehsalı. © 2010-2024