글 수 300
2006.04.16 22:19:46 (*.105.150.242)
17857
아래의 소스를 <body></body>사이에 넣어 주세요
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var message = " "
message +="--- 여유^^*";
message +="-- 여유로운 삶은 자신이 만들어 갑니다.";
message +="-- 늘 여유로운 생활이 되시기를 !"; //문구 삽입
var timer;
var msg = "";
function scrollMaster () {
msg = customDateSpring(new Date())
clearTimeout(timer)
msg += " " + showtime() + " " + message
for (var i= 0; i < 100; i++){
msg = " " + msg;
}
scrollMe()
}
function scrollMe(){
window.status = msg;
msg = msg.substring(1, msg.length) + msg.substring(0,1);
timer = setTimeout("scrollMe()", 100); //흐르는 속도 조절
}
function showtime (){
var now = new Date();
var hours= now.getHours();
var minutes= now.getMinutes();
var seconds= now.getSeconds();
var months= now.getMonth();
var dates= now.getDate();
var years= now.getYear();
var timeValue = ""
timeValue += ((months >9) ? "" : " ")
timeValue += ((dates >9) ? "" : " ")
timeValue = ( months +1)
timeValue +="/"+ dates
timeValue +="/"+ years
var ap="A.M."
if (hours == 12) {
ap = "P.M."
}
if (hours == 0) {
hours = 12
}
if(hours >= 13){
hours -= 12;
ap="P.M."
}
var timeValue2 = " " + hours
timeValue2 += ((minutes < 10) ? ":0":":") + minutes + " " + ap
return timeValue2;
}
function MakeArray(n) {
this.length = n
return this
}
monthNames = new MakeArray(12)
monthNames[1] = "1월"
monthNames[2] = "2월"
monthNames[3] = "3월"
monthNames[4] = "4월"
monthNames[5] = "5월"
monthNames[6] = "6월"
monthNames[7] = "7월"
monthNames[8] = "8월"
monthNames[9] = "9월"
monthNames[10] = "10월"
monthNames[11] = "11월"
monthNames[12] = "12월"
daysNames = new MakeArray(7)
daysNames[1] = "일요일"
daysNames[2] = "월요일"
daysNames[3] = "화요일"
daysNames[4] = "수요일"
daysNames[5] = "목요일"
daysNames[6] = "금요일"
daysNames[7] = "토요일"
function customDateSpring(oneDate) {
var theDay = daysNames[oneDate.getDay() +1]
var theDate =oneDate.getDate()
var theMonth = monthNames[oneDate.getMonth() +1]
var dayth="일"
if ((theDate == 1) || (theDate == 21) || (theDate == 31)) {
dayth="일";
}
if ((theDate == 2) || (theDate ==22)) {
dayth="일";
}
if ((theDate== 3) || (theDate == 23)) {
dayth="일";
}
return theDay + ", " + theMonth + " " + theDate + dayth + ","
}
scrollMaster();
// End -->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var message = " "
message +="--- 여유^^*";
message +="-- 여유로운 삶은 자신이 만들어 갑니다.";
message +="-- 늘 여유로운 생활이 되시기를 !"; //문구 삽입
var timer;
var msg = "";
function scrollMaster () {
msg = customDateSpring(new Date())
clearTimeout(timer)
msg += " " + showtime() + " " + message
for (var i= 0; i < 100; i++){
msg = " " + msg;
}
scrollMe()
}
function scrollMe(){
window.status = msg;
msg = msg.substring(1, msg.length) + msg.substring(0,1);
timer = setTimeout("scrollMe()", 100); //흐르는 속도 조절
}
function showtime (){
var now = new Date();
var hours= now.getHours();
var minutes= now.getMinutes();
var seconds= now.getSeconds();
var months= now.getMonth();
var dates= now.getDate();
var years= now.getYear();
var timeValue = ""
timeValue += ((months >9) ? "" : " ")
timeValue += ((dates >9) ? "" : " ")
timeValue = ( months +1)
timeValue +="/"+ dates
timeValue +="/"+ years
var ap="A.M."
if (hours == 12) {
ap = "P.M."
}
if (hours == 0) {
hours = 12
}
if(hours >= 13){
hours -= 12;
ap="P.M."
}
var timeValue2 = " " + hours
timeValue2 += ((minutes < 10) ? ":0":":") + minutes + " " + ap
return timeValue2;
}
function MakeArray(n) {
this.length = n
return this
}
monthNames = new MakeArray(12)
monthNames[1] = "1월"
monthNames[2] = "2월"
monthNames[3] = "3월"
monthNames[4] = "4월"
monthNames[5] = "5월"
monthNames[6] = "6월"
monthNames[7] = "7월"
monthNames[8] = "8월"
monthNames[9] = "9월"
monthNames[10] = "10월"
monthNames[11] = "11월"
monthNames[12] = "12월"
daysNames = new MakeArray(7)
daysNames[1] = "일요일"
daysNames[2] = "월요일"
daysNames[3] = "화요일"
daysNames[4] = "수요일"
daysNames[5] = "목요일"
daysNames[6] = "금요일"
daysNames[7] = "토요일"
function customDateSpring(oneDate) {
var theDay = daysNames[oneDate.getDay() +1]
var theDate =oneDate.getDate()
var theMonth = monthNames[oneDate.getMonth() +1]
var dayth="일"
if ((theDate == 1) || (theDate == 21) || (theDate == 31)) {
dayth="일";
}
if ((theDate == 2) || (theDate ==22)) {
dayth="일";
}
if ((theDate== 3) || (theDate == 23)) {
dayth="일";
}
return theDay + ", " + theMonth + " " + theDate + dayth + ","
}
scrollMaster();
// End -->
</SCRIPT>