CMP5-Opdracht3

Size
2,327 Kb
Views
32,384

How do I make an cmp5-opdracht3?

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

CMP5-Opdracht3 Previews

CMP5-Opdracht3 - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CMP5-Opdracht3</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <html>	<head>	<title>Vraag 1</title>	<link rel="stylesheet" type="text/css" href="reset.css">	<link rel="stylesheet" type="text/css" href="vraag1.css">	<meta charset="utf-8">	</head>	<body>	<div id="mijndiv"> <p class="getal"></p> <p>Deelbaar door:</p> <div id="twee">2</div> <div id="drie">3</div> <div id="vijf">5</div> <p id="bingo" class="verborgen">BINGO!</p>	</div>	<script src="vraag1.js"></script>	</body>
</html> <script src="js/index.js"></script>
</body>
</html>

CMP5-Opdracht3 - Script Codes CSS Codes

body { background-color: darkolivegreen; font-family: "helvetica neue";}
#mijndiv { background-color: white; width: 340px; height: 280px; left: 50%; top: 50%; margin-left: -185px; margin-top: -250px; position: absolute; border: 15px solid yellowgreen;}
p { color: lightgrey; font-size: 1.2em; margin: 15px auto 0 auto; width: 140px; font-weight: 700;
}
p.getal { font-size: 1.4em; text-align: center; margin-top: 30px; border: 15px solid lightgrey; width: 50px; height: 40px; font-size: 2em; padding-top: 10px; color: lightgrey;
}
p#bingo { color: red; width: 70px;
}
.verborgen { display: none;
}
#twee, #drie, #vijf { border: 15px solid lightgrey; width: 50px; height: 40px; float: left; margin-top: 20px; margin-bottom: 8px; color: lightgrey; padding-top: 10px; text-align: center; font-size: 2em; font-weight: 700;}
#twee, #drie {margin-right: 25px;}
#twee {margin-left: 25px;}
#twee.groen, #drie.groen, #vijf.groen { border: 15px solid yellowgreen; color: yellowgreen;}

CMP5-Opdracht3 - Script Codes JS Codes

function main() { var getal = document.getElementsByClassName('getal')[0]; getal.innerHTML = random(50);
if (getal.innerHTML % 2 === 0) { document.getElementById('twee').className='groen'; } else {document.getElementById('twee').className = '';}
if (getal.innerHTML % 3 === 0) { document.getElementById('drie').className='groen'; } else {document.getElementById('drie').className = '';}
if (getal.innerHTML % 5 === 0) { document.getElementById('vijf').className='groen'; } else {document.getElementById('vijf').className = '';} if (getal.innerHTML % 2 === 0 && getal.innerHTML % 3 === 0 && getal.innerHTML % 5 === 0 ) { document.getElementById("bingo").className = ""; } else { document.getElementById("bingo").className = "verborgen"; }
}
var random = function (aantal) { return Math.floor((Math.random() * aantal));
}
window.onload = function() { setInterval(main, 1000);
}
CMP5-Opdracht3 - Script Codes
CMP5-Opdracht3 - Script Codes
Home Page Home
Developer Sanne Van Gastel
Username SannevanGastel
Uploaded July 30, 2022
Rating 3
Size 2,327 Kb
Views 32,384
Do you need developer help for CMP5-Opdracht3?

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 web content 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!