十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
td width="23%" align="left"今天是:
让客户满意是我们工作的目标,不断超越客户的期望值来自于我们对这个行业的热爱。我们立志把好的技术通过有效、简单的方式提供给客户,将通过不懈努力成为客户在信息化领域值得信任、有价值的长期合作伙伴,公司提供的服务项目有:空间域名、网页空间、营销软件、网站建设、昂昂溪网站维护、网站推广。
script language="JavaScript" type="text/javascript"
var day="";
var month="";
var ampm="";
var ampmhour="";
var myweekday="";
var year="";
mydate=new Date();
myweekday=mydate.getDay();
mymonth=mydate.getMonth()+1;
myday= mydate.getDate();
myyear= mydate.getYear();
year=(myyear 200) ? myyear : 1900 + myyear;
if(myweekday == 0)
weekday=" 星期日 ";
else if(myweekday == 1)
weekday=" 星期一 ";
else if(myweekday == 2)
weekday=" 星期二 ";
else if(myweekday == 3)
weekday=" 星期三 ";
else if(myweekday == 4)
weekday=" 星期四 ";
else if(myweekday == 5)
weekday=" 星期五 ";
else if(myweekday == 6)
weekday=" 星期六 ";
document.write(year+"年"+mymonth+"月"+myday+"日 "+weekday);/script/td
!DOCTYPE html
html lang="en"
head
meta charset="UTF-8"
titleDocument/title
style
*{margin:0;padding:0;}
.tdemo{width: 600px;height: 400px;margin:100px auto;}
.ttitle{background:#dfdfdf;height:50px;text-align:center;}
.tcontent{background:#eee;height:300px;}
.cnt{padding:20px 25px;}
.cnt p{line-height:25px;font-size:15px;color:#222;}
.tcontent h6{text-indent:25px;font-size:16px;color:#111;}
.tcontent p.last{text-indent:25px;}
.tfoot{background:#aaa;height:50px;}
.tfoot button{width: 60px;height: 28px;float: right;margin-right: 30px;}
/style
/head
body
table class="tdemo"
tr class="ttitle"
td
span id="time"/span
/td
/tr
tr class="tcontent"
td
h6谜面:/h6
div class="cnt"
p1.一只羊在吃草,一只狼从旁边经过没有吃羊。/p
p2.又一只狼经过,还是没有吃羊。/p
p3.第三只狼经过,羊冲狼大叫,狼还是没有吃羊。/p
/div
p class="last"打:三种动物/p
/td
/tr
tr class="tfoot"
td
button查看谜底/button
/td
/tr
/table
script
var showzone=document.getElementById("time");
var time=new Date();
var yy=time.getFullYear();
var mm=time.getMonth()+1;
var dd=time.getDate();
var kk=time.getDay();
var xingqi;
if(kk==0){
k="星期天"
}
else if(kk==1){
xingqi="星期一";
}
else if(kk==2){
xingqi="星期二"
}
else if(kk==3){
xingqi="星期三"
}
else if(kk==4){
xingqi="星期四"
}
else if(kk==5){
xingqi="星期五"
}
else{
xingqi="星期六";
}
showzone.innerHTML="今天是:"+yy+"年"+mm+"月"+dd+"日"+xingqi+" ---欢迎你来猜一猜";
/script
/body
/html
diva href="#" style="float:left; text-align:left; margin-left:10px;"文字列表内容/aspan style="clear:both;float:right; margin-right:20px;"时间/span/div
至于时间不显示年,要改js代码,一般是把年份隐藏,有是系统时间,要代码控制的。
html
head
meta http-equiv="Content-Type" content="text/html; charset=gb2312"
meta name="keywords" content="js特效" /
meta name="description" content="js特效网" /
title年月日分秒全部显示的时间代码/title
/head
body onload=startclock()
form name="clock"
script language="JavaScript"
var timerID = null;
var timerRunning = false;
function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;}
function startclock () {
stopclock();
showtime();}
function showtime () {
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds()
var timeValue = now.getYear()+"年"+(now.getMonth()+1)+"月"+now.getDate()+"日" +((hours = 12) ? " 下午 " : " 上午 " )
timeValue += ((hours 12) ? hours -12 :hours)
timeValue += ((minutes 10) ? ":0" : ":") + minutes
timeValue += ((seconds 10) ? ":0" : ":") + seconds
document.clock.thetime.value = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true;}
/script
input name="thetime" style="font-size: 9pt;color:#000000;border:1px solid #FFFFFF; ; " size="28"/form
/body
/html
在空间上显示天气预报+系统信息+日历+问候+签名
把以下代码插入最后一行即可!
#comm_info div.line{margin-top:8px;line-height:10px;border-top:2px solid #BBC1C6;
background:url() no-repeat bottom; padding-bottom: 100px;
margin-bottom: 25px}