• Trang chủ

Huỳnh Trọng Đức IT

ddddddddd

  • Home
  • Thủ Thuật
  • Download

Widget hiển thị ngày giờ

Đăng nhận xét tháng 10 16, 2017

Bước 1: Copy đoạn code sau và thêm vào ô chứa code của blog bạn.
<div id="clockDiv"></div>
<script language="javascript">
var myVar=setInterval(function(){Clock()},1000);
function Clock() {
a=new Date();
w=Array("Chủ Nhật","Thứ 2","Thứ 3","Thứ 4","Thứ 5","Thứ 6","Thứ 7");
var a=w[a.getDay()],
w=new Date,
d=w.getDate();
m=w.getMonth()+1;
y=w.getFullYear();
h=w.getHours();
mi=w.getMinutes();
se=w.getSeconds();
if(10>d){d="0"+d}
if(10>m){m="0"+m}
if(10>h){h="0"+h}
if(10>mi){mi="0"+mi}
if(10>se){se="0"+se}
document.getElementById("clockDiv").innerHTML="Bây giờ là: "+a+", "+d+" / "+m+" / "+y+" - "+h+":"+mi+":"+se+"";
}
</script>
Bước 2: Lưu lại và tận hưởng :))
* Lưu ý: các phần tô màu bạn có thể chỉnh sửa theo ý bạn.
Share
thu thuat tt blogger widget

Không có nhận xét nào :

Giới thiệu về tôi

Ảnh của tôi
Huỳnh Trọng Đức
Đồng Nai, Nhơn Trạch, Vietnam
Xem hồ sơ hoàn chỉnh của tôi

Nhãn

thu thuat (21) Music (12) Technology (12) People (11) Web Design (9) Graphic Design (8) Motion Design (8) Fashion (7) Foods (7) Sports (7) Video (7) tt blogger (7) windows (7) Gallery (6) Nature (6) tt windows (6) windows 10 (6) Travel (5) tt phan mem (5) c cong cong (4) code (4) html css (4) widget (4) windows 7 (4) windows 8 (4) Cars (3) City (3) Entertainment (3) Phone (3) tips (3) Movies (2) Print Design (2) Server (2) Title (2) Update (2) cuoc song (2) facebook (2) tt internet (2) Short (1) Test (1) download (1) internet (1) picture (1) template blogger (1) tt van phong (1) word (1) youtube (1)

Huỳnh Trọng Đức IT

ddddddddd

Tổng số lượt xem trang

Trang

  • Trang chủ
Được tạo bởi Blogger
By HTD