Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Starting code is below <!DOCTYPE html> <html lang=\"en\"> <head> <title>Lab #2</

ID: 3754382 • Letter: S

Question

Starting code is below

<!DOCTYPE html>
<html lang="en">
<head>
<title>Lab #2</title>
<style>
div {font-size:50px;display:inline;}
</style>
</head>

<body>
<h3>Lab #2</h3>
<div id="msg">xyzzy</div>
  
  
<script>
//Your JavaScript Code goes here
  
  
  
</script>
  
  
</body>


</html>

Modify lab2.html Execute a JavaScript statement to change the text of the DIV element from xyzzy to XYZZY. For an example, see dynamicpage4.htm1 Part 1: Execute JavaScript statements to displays all of the numbers from 1 to 1,000 that are multiples of 5 on the page Part 2: Execute JavaScript statements to displays all of the numbers from 1 to 1,000 that are multiples of 5 on the page in an HTML table Part 3: Execute JavaScript statements to displays all of the numbers from 1 to 1,000 that are multiples of 5 on the page in an HTML table, co and even numbers blue lor odd numbers red

Explanation / Answer

Here is code:

<!DOCTYPE html>

<html lang="en">

<head>

<title>Lab #2</title>

<style>

div {

font-size: 50px;

display: inline;

}

</style>

</head>

<body>

<h3>Lab #2</h3>

<div id="msg">xyzzy</div>

<script>

document.getElementById("msg").innerHTML = "XYZZY";

var data = "<ul>";

for (let i = 1; i <= 1000; i++) {

if (i % 5 == 0)

data += "<li>" + i + "</li>"

}

data += "</ul>";

document.getElementsByTagName("body")[0].innerHTML += data;

data = `<table border="1"><tbody>`

for (let i = 0; i <= 1000; i++) {

if (i % 5 == 0) {

data += "<tr><td>" + i + "</td></tr>"

}

}

data += "</tbody></table>"

document.getElementsByTagName("body")[0].innerHTML += data;



data = `<table border="1"><tbody>`

var counter = 1;

for (let i = 0; i <= 1000; i++) {

if (i % 5 == 0) {

if (counter % 2 == 0) {

data += "<tr><td>" + i + "</td></tr>"

} else {

data += "<tr><td>" + i + "</td></tr>"

}

counter++;

}

}

data += "</tbody></table>"

document.getElementsByTagName("body")[0].innerHTML += data;

</script>

</body>

</html>

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote