-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotindex.html
55 lines (55 loc) · 1.48 KB
/
notindex.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html>
<head>
<title>My Website</title>
<script>
function getTime() {
var xhr = new XMLHttpRequest();
xhr.open('GET', '/');
xhr.onload = function() {
if (xhr.status === 200) {
document.getElementById('time').innerHTML = xhr.responseText;
}
};
xhr.send();
}
</script>
</head>
<body onload="getTime()">
<header>
<nav>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
</header>
<main>
<section id="home">
<h1>Welcome to My Website</h1>
<p>The current date and time is:</p>
<p id="time"></p>
</section>
<section id="about">
<h1>About Me</h1>
<p>I am a web developer and I love creating websites.</p>
</section>
<section id="contact">
<h1>Contact Me</h1>
<form action="#">
<label for="name">Name:</label>
<input type="text" id="name" name="name"><br><br>
<label for="email">Email:</label>
<input type="email" id="email" name="email"><br><br>
<label for="message">Message:</label>
<textarea id="message" name="message"></textarea><br><br>
<button type="submit">Send</button>
</form>
</section>
</main>
<footer>
<p>© 2023 My Website</p>
</footer>
</body>
</html>