坏脾气 发表于 2006 年 9 月 23 日 16:47:43

谁有PHP的倒计时程序

我想找一个PHP的倒计时程序,最好能放在BLOG上!有的请告诉我,谢谢!

linxicn 发表于 2006 年 9 月 23 日 17:17:49

自己写一个啊

枫恋 发表于 2006 年 9 月 23 日 17:23:49

是条用别人的

坏脾气 发表于 2006 年 9 月 23 日 17:26:06

<html>
<head>

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
var Temp2;
var timerID = null;
var timerRunning = false;
function arry() {
this.length = 12;
this = 31;
this = 28;
this = 31;
this = 30;
this = 31;
this = 30;
this = 31;
this = 31;
this = 30;
this = 31;
this = 30;
this = 31;
}
var date = new arry();

function stopclock() {
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}

function startclock() {
stopclock();
showtime();
}

function showtime() {
now = new Date();
var CurMonth = now.getMonth();
var CurDate = now.getDate();
var CurYear = now.getFullYear();
now = null;
if (1 < CurDate) {
CurDate -= date; CurMonth++;
}
if (11 < CurMonth) {
CurMonth -= 12; CurYear++;
}

var Yearleft = 2006 - CurYear;
var Monthleft = 9 - CurMonth;
var Dateleft = 30 - CurDate;

document.dateform.a.value = Yearleft;
document.dateform.b.value = Monthleft;
document.dateform.c.value = Dateleft;

timerID = setTimeout("showtime()",1000);
timerRunning = true;
}
// End -->
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<BODY Onload="startclock()">
<form name=dateform>距离老婆回家还有<br>
<input type=text name=a size=2 value="">年
<input type=text name=b size=2 value="">月
<input type=text name=c size=2 value="">天
</br></form>

<!-- 代码长度: 1.95 KB -->
</body>
</html>

但是我不知道如何加到我的BLOG-Sablog-X 上!!!谁教教我?

mcncc 发表于 2006 年 9 月 23 日 17:33:21

dreamake 发表于 2006 年 9 月 23 日 17:51:43

防自制。。

坏脾气 发表于 2006 年 9 月 23 日 19:07:43

原帖由 mcncc 于 2006-9-23 17:33 发表

有什么啊?

linxicn 发表于 2006 年 9 月 23 日 20:25:34

原帖由 坏脾气 于 2006-9-23 17:26 发表
<html>
<head>

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
var Temp2;
var timerID = null;
var timerRunning = false;
function arry() {
this.length = 12;
this ...


改模版啊,晕掉,改模版了你想加到那儿就加到那儿啊

ppopcn 发表于 2006 年 9 月 23 日 20:29:31

JS的不行么???
页: [1]
查看完整版本: 谁有PHP的倒计时程序