Bài tập này khá hay. các bạn tham khảo nha.
PHP:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Day - Month - Year</title>
</head>
<body>
<body bgcolor=black>
<Script language="javascript" type="text/javascript">
<!-- Hide script from old browsers
dayName = new Array ("Chủ nhật","Thứ hai","Thứ ba","Thứ tư","Thứ năm","Thứ sáu","Thứ bảy")
monName = new Array ("Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12")
now = new Date
document.write("<font color=green size=4></b>Bây giờ là " +now.getHours()+ " giờ " +now.getMinutes()+ " phút " +now.getSeconds()+ " giây - "
+dayName[now.getDay()]+ " ngày " +now.getDate()+ " " +monName[now.getMonth()]+ " năm " +now.getFullYear()+ ".</b></font>")
//Ending hiding script from old browsers -->
</Script>
</body>
</html>
SƯu Tầm