|
-Trang Chủ- |
Giúp Đỡ
Music Online
Nhac Online
Music Online
Thành Viên
Lịch
|
| Welcome Guest ( Log In | Register ) | Resend Validation Email |
| Welcome to *¤°(¯`·.º-:¦:-UocMoXanh-:¦:-º.·´¯) *¤°. We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| <% |
| · Portal |
Help
Search
Members
Calendar
|
| Welcome Guest ( Log In | Register ) | Resend Validation Email |
| Welcome to *¤°(¯`·.º-:¦:-UocMoXanh-:¦:-º.·´¯) *¤°. We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |



Hiển thị kiểu thời gian dd-mm-yy hh-mm-ss
trungnguyen

(¯`°·.UocMoXanh.·°´¯)

Group: Administrator
Posts: 1.658
Member No.: 1
Joined: Oct 10 2005, 01:11 AM
![]()
COPY đoạn code này vào thẻ <head> trong web sizte của bạn.
<script>
function display_time_in_status_line()
{
var d = new Date(); // tháng/ngày/năm
var y = d.getYear(); // Giá trị năm
var h = d.getHours(); // Xuất giờ : từ 0 - 23
var m = d.getMinutes(); // Xuất phút : từ 1 -59
var s = d.getSeconds(); // xuất giây : từ 1 - 59
var mo = d.getMonth() + 1; // từ tháng 1 - 12
var da = d.getDate(); // extract days: 1 to 31
var ampm = (h >= 12)?"PM":"AM"; // Sáng hoặc chiều ?
if (h > 12) h -= 12; // convert 24-hour format to 12-hour
if (h == 0) h = 12; // convert 0 o'clock to midnight
if (m < 10) m = "0" + m; // convert 0 minutes to 00 minutes, etc.
var t = mo + '/' + da + '/' + y + ' ' + h + ':' + m + ':' + s + ' ' + ampm; // chọn kiểu khác
defaultStatus = t; // display it in the status line
// arrange to do it again in 1 second.
setTimeout("display_time_in_status_line()", 1000); // 1000 ms trong 1 giây
}
</script>
Thêm đoạn này vào tag <body>, onLoad="display_time_in_status_line();"> kiểu như : <BODY onLoad="display_time_in_status_line();">
--------------------



