<script type="text/javascript"> function currenttime() { var tm = document.getElementById('tm'); var current_time = new Date(); tstr = current_time.toTimeString(); var str = "" + tstr + "" tm.innerHTML = str; } </script> <br> <div id="tm">Current Time Place Holder</div> <br> <input type=button onclick="currenttime();" value="Show Current Time" style="font-size:17px">