User:I6: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<!DOCTYPE html> | <!DOCTYPE html> | ||
<head> | |||
<STYLE TYPE="text/css"> | |||
<!-- | |||
BODY{ | |||
overflow-x:hidden; | |||
} | |||
.s1 | |||
{ | |||
position : absolute; | |||
font-size : 10pt; | |||
color : blue; | |||
visibility: hidden; | |||
} | } | ||
.s2 | |||
{ | |||
position : absolute; | |||
font-size : 18pt; | |||
color : red; | |||
visibility : hidden; | |||
} | } | ||
.s3 | |||
{ | |||
position : absolute; | |||
font-size : 14pt; | |||
color : gold; | |||
visibility : hidden; | |||
} | } | ||
.s4 | |||
{ | |||
position : absolute; | |||
font-size : 12pt; | |||
color : lime; | |||
visibility : hidden; | |||
} | |||
//--> | |||
</style> | |||
</head> | |||
<body> | |||
<DIV ID="div1" CLASS="s1">*</DIV> | |||
<DIV ID="div2" CLASS="s2">*</DIV> | |||
<DIV ID="div3" CLASS="s3">*</DIV> | |||
<DIV ID="div4" CLASS="s4">*</DIV> | |||
<p align="center"><font face="arial" size="5">Countdown until the Year 3000</font><br> | |||
<font face="arial, helvetica" size="1"><a href="http://www.codecademy.com/i6">Made by | |||
i6</a></font></p> | |||
<SCRIPT LANGUAGE="javascript" TYPE="text/javascript"> | |||
//Updated December 15th, 2015 8:54:45 AM | |||
var standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes | |||
var nav = (!document.all || window.opera); | |||
var tmr = null; | |||
var spd = 50; | |||
var x = 0; | |||
var x_offset = 5; | |||
var y = 0; | |||
var y_offset = 15; | |||
document.onmousemove = get_mouse; | |||
function get_mouse(e) | |||
{ | |||
x = (nav) ? e.pageX : event.clientX+standardbody.scrollLeft; | |||
y = (nav) ? e.pageY : event.clientY+standardbody.scrollTop; | |||
x += x_offset; | |||
y += y_offset; | |||
beam(1); | |||
} | } | ||
function beam(n) | |||
{ | |||
if(n<5) | |||
left | { | ||
document.getElementById('div'+n).style.top=y+'px' | |||
document.getElementById('div'+n).style.left=x+'px' | |||
document.getElementById('div'+n).style.visibility='visible' | |||
n++; | |||
tmr=setTimeout("beam("+n+")",spd); | |||
} | |||
else | |||
{ | |||
clearTimeout(tmr); | |||
fade(4); | |||
} | |||
} | |||
function fade(n) | |||
{ | |||
if(n>0) | |||
{ | |||
document.getElementById('div'+n).style.visibility='hidden' | |||
n--; | |||
tmr=setTimeout("fade("+n+")",spd); | |||
} | |||
else clearTimeout(tmr); | |||
} | |||
// --> | |||
</SCRIPT> | |||
</body> | |||
<body> | |||
<form name="count" method="post"> | |||
<input type="text" size="69" name="count2"> | |||
</form> | |||
<script> | |||
/* | |||
this website is here to countdown when the date becomes 3000/1/1 | |||
*/ | |||
//change the text below to reflect your own, | |||
var before="the Year 3000!" | |||
var current="Today is Year 3000!" | |||
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec") | |||
function countdown(yr,m,d){ | |||
theyear=yr;themonth=m;theday=d | |||
var today=new Date() | |||
var todayy=today.getYear() | |||
if (todayy < 1000) | |||
todayy+=1900 | |||
var todaym=today.getMonth() | |||
var todayd=today.getDate() | |||
var todayh=today.getHours() | |||
var todaymin=today.getMinutes() | |||
var todaysec=today.getSeconds() | |||
var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec | |||
futurestring=montharray[m-1]+" "+d+", "+yr | |||
dd=Date.parse(futurestring)-Date.parse(todaystring) | |||
dday=Math.floor(dd/(60*60*1000*24)*1) | |||
dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1) | |||
dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1) | |||
dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1) | |||
if(dday==0&&dhour==0&&dmin==0&&dsec==1){ | |||
document.forms.count.count2.value=current | |||
return | |||
} | |||
else | |||
document.forms.count.count2.value=dday+ " days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds left until "+before | |||
setTimeout("countdown(theyear,themonth,theday)",1000) | |||
} | } | ||
//enter the count down date using the format year/month/day | |||
countdown(3000,1,1) | |||
</script> | |||
</body> | |||
<style type="text/css"> | |||
body {background-color:FF3333;background-image:url(http://www.quackit.com/pix/smile.gif);background-repeat:repeat;background-position:center center;background-attachment:fixed;} | |||
table, tr, td {background:transparent; border:0px;}table table {border:0px;}table table table table {border:0px;}table table table {background-color:33FF99;border-width:0;border-style:solid;border-color:ffcc00;} | |||
td, span, div, input, a, table td div div font, body div table tbody tr td font {font-family:Arial;font-size:8pt;color:000000;} | |||
a {color:000099;} | |||
</style> | |||
<br /> |
Latest revision as of 07:38, 5 January 2016
<!DOCTYPE html> <head> <STYLE TYPE="text/css"> </style> </head> <body>
Countdown until the Year 3000
<a href="http://www.codecademy.com/i6">Made by
i6</a>
<SCRIPT LANGUAGE="javascript" TYPE="text/javascript">
//Updated December 15th, 2015 8:54:45 AM
var standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
var nav = (!document.all || window.opera); var tmr = null; var spd = 50; var x = 0; var x_offset = 5; var y = 0; var y_offset = 15;
document.onmousemove = get_mouse;
function get_mouse(e) {
x = (nav) ? e.pageX : event.clientX+standardbody.scrollLeft; y = (nav) ? e.pageY : event.clientY+standardbody.scrollTop; x += x_offset; y += y_offset; beam(1);
}
function beam(n) {
if(n<5) {
document.getElementById('div'+n).style.top=y+'px' document.getElementById('div'+n).style.left=x+'px' document.getElementById('div'+n).style.visibility='visible'
n++; tmr=setTimeout("beam("+n+")",spd); } else { clearTimeout(tmr); fade(4); }
}
function fade(n) {
if(n>0) {
document.getElementById('div'+n).style.visibility='hidden'
n--; tmr=setTimeout("fade("+n+")",spd); } else clearTimeout(tmr);
}
// --> </SCRIPT> </body> <body> <form name="count" method="post"> <input type="text" size="69" name="count2"> </form>
<script>
/* this website is here to countdown when the date becomes 3000/1/1
- /
//change the text below to reflect your own,
var before="the Year 3000!"
var current="Today is Year 3000!"
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
function countdown(yr,m,d){ theyear=yr;themonth=m;theday=d var today=new Date() var todayy=today.getYear() if (todayy < 1000) todayy+=1900 var todaym=today.getMonth() var todayd=today.getDate() var todayh=today.getHours() var todaymin=today.getMinutes() var todaysec=today.getSeconds() var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec futurestring=montharray[m-1]+" "+d+", "+yr dd=Date.parse(futurestring)-Date.parse(todaystring) dday=Math.floor(dd/(60*60*1000*24)*1) dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1) dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1) dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1) if(dday==0&&dhour==0&&dmin==0&&dsec==1){ document.forms.count.count2.value=current return } else document.forms.count.count2.value=dday+ " days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds left until "+before setTimeout("countdown(theyear,themonth,theday)",1000) } //enter the count down date using the format year/month/day countdown(3000,1,1) </script> </body> <style type="text/css">
body {background-color:FF3333;background-image:url(http://www.quackit.com/pix/smile.gif);background-repeat:repeat;background-position:center center;background-attachment:fixed;} table, tr, td {background:transparent; border:0px;}table table {border:0px;}table table table table {border:0px;}table table table {background-color:33FF99;border-width:0;border-style:solid;border-color:ffcc00;} td, span, div, input, a, table td div div font, body div table tbody tr td font {font-family:Arial;font-size:8pt;color:000000;} a {color:000099;}
</style>