title: How to put current date and time inside textbox in PHP Javascript
body: <p>I am trying to put in my textbox the current time, with my preferred format (ex. 14:25:30)
  What's wrong with my code? because when I run it, the textbox appears empty.</p>
  
  <pre><code>&lt;td&gt;
      &lt;input id="date" name="curTime" size="20" maxlength="20"  Required /&gt;
  &lt;/td&gt;
  &lt;script type="text/javascript"&gt;
      var timenow = new Date();
      timenow.format("UTC:h:MM:ss TT Z");
      document.getElementById("date").value = new Date().toUTCString();
  &lt;/script&gt;
  </code></pre>