JS-DATE函数

<!DOCTYPE html>
<html>
  <head>
    <title>08-DATE对象.html</title>
    <meta http-equiv="content-type" content="text/html;charset=gbk">
    <script type="text/javascript">
    /*function clockon(){
    
    var thistime=new Date();
    
    var hours=thistime.getHours();
    var minutes=thistime.getMinutes();
    var seconds=thistime.getSeconds();
    
    if(eval(hours<10)){hours="0"+hours;}
    if(eval(minutes)<10)){minutes="0"+minutes;}
    if(seconds<10){seconds="0"+seconds;}
    
    var thistimes=hours+":"+minutes+":"+seconds;
    
    alert(thistimes);
    

    }
*/
    function f1(){
        alert("love");
    }
    
    alert("f1.toString()");
        </script>
  </head>
  
  <body >
    This is my HTML page. <br>
    

    <input type="button" value="press" onclick="clockon()" >
    <input type="button" value="press1" onclick="f1()" >


    
    
  </body>
</html>

有一个问题没有解决。。。

posted @ 2016-09-06 09:54  ALMOST_MUJIN  阅读(114)  评论(0编辑  收藏  举报