Question: 2. Principle Implement a Web Page using HTML and JavaScript language. For this Lab you have to create a Web page that contains the following

2. Principle Implement a Web Page using HTML and JavaScript language. For this Lab you have to create a Web page that contains the following elements: 1. a paragraph to show time (hour: minute: second) repeatedly; 2. 2 buttons, one is to start refresh time information, the other is to stop refreshing time information. When the web page is loaded, there is nothing shown in the paragraph. When you press the first button, all the time information is refreshing themself every second. When you press the second button, the time information stop refreshing. 3. Lab Length 1 Hour 4. Lab Step To solve this lab as smooth as possible, you should divide this project into the following points: (1) with a web folder, create a new html doc; (2) in the , create a p id="..." > tag to show the time information, two buttons to start or stop refreshing time; (3) after the
element, put down ; (4) inside the ,: (1) define a function "showTime0"to show the current hour, minute, second, where a Date object is useful; (5) in the first button, add property "onclick= 'handler=setInterval(showTime, 1000)'; " (6) in the second button, add property "onclick= 'clearInterval(handler)'; " (7) open this html in the browser, to test the two functions and take screen shots; (8) Copy your html and script below
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
