CMP5-Opdracht4

Size
1,941 Kb
Views
54,648

How do I make an cmp5-opdracht4?

What is a cmp5-opdracht4? How do you make a cmp5-opdracht4? This script and codes were developed by Sanne Van Gastel on 30 July 2022, Saturday.

CMP5-Opdracht4 Previews

CMP5-Opdracht4 - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CMP5-Opdracht4</title> <link rel="stylesheet" href="css/style.css">
</head>
<body>	<div></div>	<div></div>	<div></div>	<div></div>	<div></div>	<div></div>	<div></div>	<div></div>	<div></div>	<p></p>	<script src="vraag2.js"></script> <script src="js/index.js"></script>
</body>
</html>

CMP5-Opdracht4 - Script Codes CSS Codes

div { box-sizing: border-box; border: 1px solid black; width: 100px; height: 100px; float: left; margin-right: 10px; margin-bottom: 10px;}
div:nth-child(3), div:nth-child(6), div:nth-child(9) {margin-right: 0;}
body { width: 320px; margin: 50px auto;}
.rood { background-color: red;}
p { display: inline; font-family: "helvetica neue"; color: darkgrey;}

CMP5-Opdracht4 - Script Codes JS Codes

function main() { var myDivItems = document.getElementsByTagName('div'); var myFirstDiv = document.getElementsByTagName('div')[0]; var i=1; var j=2; myFirstDiv.setAttribute('class', 'rood'); myFirstDiv.onclick = function() { if (i<8){ myDivItems[i].className='rood'; myDivItems[j].className='rood'; i=i+2; j=j+2; } else if(i=8){ for(var k=1; k<9; k++){ myDivItems[k].className = ""; } i=1; j=2; } } }
window.onload = function() { main();
}
CMP5-Opdracht4 - Script Codes
CMP5-Opdracht4 - Script Codes
Home Page Home
Developer Sanne Van Gastel
Username SannevanGastel
Uploaded July 30, 2022
Rating 3
Size 1,941 Kb
Views 54,648
Do you need developer help for CMP5-Opdracht4?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Sanne Van Gastel (SannevanGastel) Script Codes
Create amazing video scripts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!