0% found this document useful (0 votes)
3 views

css prac 8

The document provides an HTML example that demonstrates the use of JavaScript to display the current date and time. It includes a button that, when clicked, updates a paragraph element with the current date and time using the Date() object. The code is structured with basic HTML elements including a heading, button, and paragraph.

Uploaded by

laita nikam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

css prac 8

The document provides an HTML example that demonstrates the use of JavaScript to display the current date and time. It includes a button that, when clicked, updates a paragraph element with the current date and time using the Date() object. The code is structured with basic HTML elements including a heading, button, and paragraph.

Uploaded by

laita nikam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Practical no 8 create html page to demonstrate date and time object using JavaScript

<html>

<body>

<h2>My First JavaScript</h2>

<button type="button"

onclick="document.getElementById('demo').innerHTML = Date()">

Click me to display Date and Time.</button>

<p id="demo"></p>

</body>

</html>

Output

You might also like