forked from UMSIComplexWebDesign/539F24_D11_JS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
111 lines (91 loc) · 3.43 KB
/
index.html
File metadata and controls
111 lines (91 loc) · 3.43 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>University of Michigan Football Activity</title>
<!--DO NOT CHANGE CODE-->
<!---------------------->
<style>
body {
font-family: Arial, sans-serif;
text-align: start;
background-color: grey;
}
#content {
padding: 20px;
border: 2px solid #ffcb05;
margin: 20px auto;
width: 80%;
max-width: 600px;
border-radius: 10px;
background-color: #ffffff;
}
button {
padding: 10px;
font-size: 16px;
background-color: #ffcb05;
color: #003366;
border: none;
border-radius: 5px;
cursor: pointer;
margin-top: 10px;
}
button:hover {
background-color: #d88a48;
}
#message {
margin-top: 20px;
font-size: 18px;
color: #003366;
}
.highlight {
background-color: #ffeb3b;
padding: 5px;
border-radius: 5px;
}
</style>
</head>
<body>
<div id="content">
<h1>Go Blue!</h1>
<button id="changeTitleButton" type="button" onclick="changeTitle()">Change Title</button>
<div id="message"></div>
<button id="addMessageButton">Add Game Day Message</button>
<h2>Recent and Current Stars:</h2>
<ul id="playerList">
<li>J J McCarthy (2023 National Championship Team)</li>
<li>Blake Corum (2023 National Championship Team)</li>
<li>Derrick Moore</li>
<li>Rod Moore</li>
<li>Bryce Underwood</li>
</ul>
<p>
<b>URL of this page :</b> <span id="URL"></span><br />
<b>Number of list items on this page :</b> <span id="items"></span><br />
<b>Current date/time :</b> <span id="time"></span><br />
</p>
<button type="button" onClick="displayInformation()">Display Information</button>
</div>
<!---------------->
<script>
//YOUR CODE GOES HERE
// Only use JavaScript to complete the following steps
// Step 1: Create Function to Change Title and rewrite h1 element to "Celebrate Michigan Football!"
//function
//Step 2: Inside the changeTitle function, log the message to the console
//Step 3: style the background to color #003366
document.getElementById("add ID here").addEventListener("click", function () {
// Step 4: Add the correct ID for the button, create an element 'p' and add a message "2023 Champions!" to p
document.getElementById("message").appendChild(gameDayMessage); // Add to the message div
});
const playerItems = document.querySelectorAll("li");
// Step 5: Use a conditional statement for playerItems. If there are more than 4 players, log a special message to the console "Go Blue, so many great players in one season!
// Try it out with length > 5
// (Optional) Step 6: display the local file url, number of list items, and current time and date when the button "Display information" is clicked.
function displayInformation() {
// Update the three span elements using ONLY JavaScript
}
</script>
</body>
</html>