摘要: <html> <head> <title>随机改变背景颜色(自动变化)</title> <style> #bg{ width:200px; height:200px; } </style> </head> <body> <div id="bg"></div> <script> function changeBg(){ var bg=document.g... 阅读全文
posted @ 2013-01-22 16:43 天道酬勤,坚持! 阅读(6600) 评论(1) 推荐(0) 编辑
摘要: <html> <head> <title>显示中文的星期几</title> </head> <body> <div id="showDay"></div> <script> var sd=document.getElementById("showDay"); //获得当前是星期几 var dt=new Date(); var gd=dt.getDay(); //alert(gd); switch(... 阅读全文
posted @ 2013-01-22 16:33 天道酬勤,坚持! 阅读(1713) 评论(0) 推荐(0) 编辑
摘要: <html> <head> <title>实时问候</title> </head> <body> <div id="showTime"></div> <div id="time"></div> <script> /* getDate() 从 Date 对象返回一个月中的某一天 (1 ~ 31)。 getDay() 从 Date 对象返回一周中的某一天 (0 ~ 6)。 ... 阅读全文
posted @ 2013-01-22 16:17 天道酬勤,坚持! 阅读(539) 评论(0) 推荐(0) 编辑
摘要: <html> <head> <title>注册信息验证</title> <style> *{font-size:12px;} .email{ background:url("reg2.gif") no-repeat center left; padding-left:20px; } .email1{ background:url("reg3.gif") no-repeat center... 阅读全文
posted @ 2013-01-22 15:38 天道酬勤,坚持! 阅读(384) 评论(0) 推荐(0) 编辑
摘要: <html> <head> <title>24小时倒计时(时分秒),带暂停效果</title> </head> <body onload="init();"> <div id="showDiv"></div> <input type="button" name="btn" id="click"/> <script> var time; var showDiv=document. 阅读全文
posted @ 2013-01-22 10:23 天道酬勤,坚持! 阅读(4144) 评论(0) 推荐(0) 编辑
摘要: <html> <head> <title>10秒钟阅读协议效果</title> </head> <body> <input type="button" name="btn" value="" id="btn" /> <script> var n=10; var time; var b=document.getElementById("btn"); b.disabled=true; b.style.wi 阅读全文
posted @ 2013-01-22 09:49 天道酬勤,坚持! 阅读(324) 评论(0) 推荐(0) 编辑