Question: Write a JavaScript program which will display a button with text What time is it?. When user click the button, it will display the current

Write a JavaScript program which will display a button with text "What time is it?". When user click the button, it will display the current local time with the format hh:mm:ss.ms. where hh is two digit represent the current hour. 00 means midnight. If the value is less than 10 then add a 'O' in front of the hour value. Similar to treat minutes and seconds. After the seconds, you will place a decimal () and then followed by one digit of milliseconds. The clock will update every 100 milliseconds. You can use setTimeout function (or other function) to do this. The diagrams show some of the screen shot after user clicked the button. What time is it? What time is i? 23:52:00.523:53:04.7 What time is it? What time is it? 00:03:01.1 00:03:52.1 C)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
