JavaScript Project:
Output:
Note: index.html is provided for you. You may change the styling on the HTML page but you are not allowed to add or remove any HTML elements. Addition of HTML elements must be done only through only JavaScript. send code for site.js.
Index.html code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Lab 03 - INFO6122</title>
<style>
#btn {
padding: 1.5rem;
margin: 1 rem;
}
.cellEven {
border-bottom: 3px solid #ccc;
padding: 0.7em;
margin: 1rem;
background-color: wheat;
cursor: pointer;
}
.cellOdd {
border-bottom: 3px solid #ccc;
padding: 0.7em;
margin: 1rem;
background-color: gray;
cursor: pointer;
}
#message {
padding: 1em;
background-color: indianred;
color: khaki;
width: 200px;
margin-bottom: 2em;
display: none;
font-size: 20px;
font-weight: bold;
}
</style>
</head>
<body>
<button id="btn">Generate HTML</button>
<div id="message"></div>
<script src="site.js"></script>
</body>
</html>