title: How to set am pm in javascript clock
body: <pre><code>function ShowTime() {
  var dt = new Date();
  document.getElementById("lblTime").innerHTML = dt.toLocaleTimeString();
  window.setTimeout("ShowTime()", 1000); // Here 1000(milliseconds) means one 1 Sec  
  }
  </code></pre>
  
  <p>this code to displays time in a label but it always shows am only?
  what is the way to display am pm correctly according to time (ist+5.30).
  or is there any other way to display time without refreshing page</p>