Write a JavaScript program to display the current day and time in the following format. That must display live time.
<!-- * @Name : JS_Assignment1.HTML * @Purpose : JavaScript Assignment 1. * @Description : To display the current day and time, That must display live time. * @date : 15 09 2022 * @OtherRelateFiles : JS_Assignment1.HTML --> <html> <head> <title>Indian Standard Time</title> <script type="text/javascript"> /*function to set Timeout*/ function display_c(){ var refresh=500; // Refresh rate in milli seconds mytime=setTimeout('display_ct()',refresh) } /*function to Format date and time*/ function display_ct() { var x = new Date() var x1=x.getMonth() + 1+ "/" + x.getDate() + "/" + x.getFullYear(); x1 = x1 + " <br/> " + x.getHours( )+ ":" + x.getMinutes() + ":" + x.getSeconds(); document.getElementById('ct').innerHTML = x1; display_c(); } </script> </head> <body background="E:\clock.jpg"> <center> <h1>This is Indian Standard Time</h1> <h2>Time is Running Live</h2> <p>.</p> <!-- for display purpose --> <p>.</p> <!-- for display purpose --> <p>.</p> <!-- for display purpose --> <!-- Created Button to call display_ct() after click --> <button onclick=display_ct();><h1 >Click to Watch Live</h1></button> <h1 ><span id='ct' ></span></h1> </center> </body> </html>


