原生js写个小时钟 一.代码 今天美化博客园自学的哈,分享一下 <!--标题变成时钟--> <div id="Header1_HeaderTitle"></div> <script> function get_time() { var obj = new Date(); var hour = obj.getHours(); var min = obj.getMinutes(); var seconds = obj.getSeconds()…
<!DOCTYPE html> <html> <head> <title>HTML5 Canvas Demo of clock</title> <script> function time(){ var mycanvas=document.getElementById("myCanvasTag"); var mycontext=mycanvas.getContext('2d'); //清空画布, mycontext…