Page 278 - Web Applications (803) Class 12
P. 278
<h1>WELCOME</h1>
<p> A “Danger! Do Not Pass” sign on the left-hand route advised hikers to
take the right-hand trail. Amit did not approach his hiking in this manner.
Amit interpreted the notice as an invitation to explore a region that would
be thrilling and adventurous, rather than a warning. Amit snuck by the warn-
ing sign to start an excursion he would later come to regret, as the rest in
the group all shifted to the right.</p>
<p id=”datetime”></p>
<script>
function display() {
var datetimeElement = document.getElementById(“datetime”);
var currentDate = new Date();
var str1 = “Current Date and Time: “ + currentDate.toLocaleString();
datetimeElement.textContent = str1;
}
display(); // Function call
// Refresh the date and time every second
setInterval(display, 1000);
</script>
</body>
</html>
Output:
276 Touchpad Web Applications-XII

