Tải bản đầy đủ (.doc) (3 trang)

Code Chào mừng bạn đến với website này

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (49.45 KB, 3 trang )

• Chào mừng bạn đến với website này Rất mong được giao lưu và học hỏi *
<style type="text/css">
// >
</style>
<center><script type="text/javascript">
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Hôm nay Chủ nhật","Hôm nay Thứ hai","Hôm nay Thứ ba","Hôm
nay Thứ tư","Hôm nay Thứ năm","Hôm nay Thứ sáu","Hôm nay Thứ bảy")
var montharray=new Array("01","02","03","04","05","06","07","08","09","10","11","12")
document.write("<font color='#FF0000' face='Arial' size='2'><b>"+dayarray[day]+", ngày
"+daym+"/"+montharray[month]+"/"+year+"<\/b><\/font>")
</script></center>
<script language="JavaScript" type="text/javascript">
<!
// Store the date In avarlable
d = new Date()
dateText = ""
// Get the cuurent day and convert it to the name of the day
dayValue = d.getDay()
if(dayValue == 0)
dateText += "Chủ Nhật"
else if (dayValue == 1)
dateText += "Thứ Hai"


else if (dayValue == 2)
dateText += "Thứ Ba"
else if (dayValue == 3)
dateText += "Thứ Tư"
else if (dayValue == 4)
dateText += "Thứ Năm"
else if (dayValue == 5)
dateText += "Thứ Sáu"
else if (dayValue == 6)
dateText += "Thứ Bảy"
// Get the current date; if it's before 2000,add 1900
dateText += ", Ngày " + d.getDate()+","
// Get the current month and convert it to the name of the month
monthValue = d.getMonth()
dateText += " "
if (monthValue == 0)
dateText += "Tháng 1"
if (monthValue == 1)
dateText += "Tháng 2"
if (monthValue == 2)
dateText += "Tháng 3"
if (monthValue == 3)
dateText += "Tháng 4"
if (monthValue == 4)
dateText += "Tháng 5"
if (monthValue == 5)
dateText += "Tháng 6"
if (monthValue == 6)
dateText += "Tháng 7"
if (monthValue == 7)

dateText += "Tháng 8"
if (monthValue == 8)
dateText += "Tháng 9"
if (monthValue == 9)
dateText += "Tháng 10"
if (monthValue == 10)
dateText += "Tháng 11"
if (monthValue == 11)
dateText += "Tháng 12"
// Get the current year; if it's before 2000, add 1900
if (d.getYear() < 2000)
dateText += ", Năm " + (1900 + d.getYear())
else
dateText += ", Năm " + (d.getYear())
// Get the current minutes
minuteValue = d.getMinutes()
if (minuteValue < 10)
minuteValue = "0" + minuteValue
// Get the current hours
hourValue = d.getHours()
// Customize the greeting based on the current hours
if (hourValue < 6)
{
greeting = "<center>Duy Thạch chào ngày mới! <\/center>"
greeting1 = "<center>Chúc các bạn một ngày mới an lành!<\/center>"
}
else if (hourValue < 10)
{
greeting = "<center>CHÀO BUỔI SÁNG! <\/center>"
greeting1 = "<center>Chúc các bạn một buổi sáng tốt lành!<\/center>"

}
else if (hourValue < 11)
{
greeting = "<center>SẮP TRƯA RỒI!<\/center>"
greeting1 = "<center>Chúc các bạn có một ngày thành công và hạnh phúc!.<\/center>"
}
else if (hourValue < 13)
{
greeting = "<center>ĐÃ BUỔI TRƯA RỒI ĐÓ!<\/center>"
greeting1 = "<center>Chúc các bạn có bữa trưa thật ngon miệng!<\/center>"
}
else if (hourValue < 14)
{
greeting = "<center>SẮP SANG BUỔI CHIỀU RỒI!<\/center>"
greeting1 = "<center>Chúc các bạn có 1 buổi chiều thành công!<\/center>"
}
else if (hourValue < 17)
{
greeting = "<center>ĐÃ BUỔI CHIỀU!<\/center>"
greeting1 = "<center>Hãy cố gắng hoàn thành công việc trong ngày!<\/center>"
}
else if (hourValue < 18)
{
greeting = "<center>SẮP TỐI RỒI!<\/center>"
greeting1 = "<center>Chúc các bạn có bữa tối thật ngon miệng bên người thân!<\/center>"
}
else if (hourValue <= 21)
{
greeting = "<center>CHÀO BUỔI TỐI!<\/center>"
greeting1 = "<center>Chúc các bạn có bữa tối thật vui vẻ và hạnh phúc bên người thân!

<\/center>"
}
else if (hourValue <= 22)
{
greeting = "<center>ĐÃ KHUYA RỒI ĐẤY!<\/center>"
greeting1 = "<center>Hãy đi ngủ thôi! Chúc các bạn có một giấc ngủ thật ngon cùng những
giấc mơ đẹp!<\/center>"
}
else
{
greeting = "<center>SẮP SANG NGÀY MỚI RỒI! <\/center>"
greeting1 = "<center>Hãy cầu chúc đi! Chúc 1 ngày mới có thật nhiều niềm vui mới!
<\/center>"
}
// Write the greeting, the date, and the time to the page
document.write(greeting +greeting1)
// >
</script> <marquee><span style='font-size:9.0pt;font-family:Arial;color:blue'>Website đang
trong quá trình nâng cấp. Mong quý thầy cô thông cảm!</span></marquee>

×