日期:2014-05-18  浏览次数:20410 次

怎么在TEXTBOXT里面动态显示时间啊
怎么在TEXTBOXT里面动态显示时间啊

------解决方案--------------------
HTML code

<HTML>
 <HEAD>
  <TITLE> New Document </TITLE>
  <META NAME="Generator" CONTENT="EditPlus">
  <META NAME="Author" CONTENT="">
  <META NAME="Keywords" CONTENT="">
  <META NAME="Description" CONTENT="">
 </HEAD>

 <BODY >
  <input type="textbox" id="txt" />
  <script>
  function ShowTime()
  {
    var now = new Date();
    document.getElementById("txt").value = now.getHours()+":"+now.getMinutes()+":"+now.getSeconds();
  }
 setInterval(ShowTime,1000);
  </script>
 </BODY>
</HTML>