Coin Flip

Size
2,142 Kb
Views
42,504

How do I make an coin flip?

What is a coin flip? How do you make a coin flip? This script and codes were developed by Bradley Engelhardt on 13 August 2022, Saturday.

Coin Flip Previews

Coin Flip - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Coin Flip</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <html lang="en">
<head> <meta charset="utf-8"> <meta name="description" content="A quiz game for ninjas"> <meta name="author" content="DAZ"> <title>RandomChance</Title> <link rel="stylesheet" href="css/styles.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body> <header> </header> <div class="container"> <h1>Coin Flip</h1> <p id = 'results'>Flip a coin!</p> <br> <button class="btn btn-success" id="dice"> <i class="fa fa-thumbs-o-up"></i>&nbsp;Flip Coin</button> <button class="btn btn-danger" id="reload"> <i class="fa fa-refresh"></i>&nbsp;Refresh</button> <script src="js/scripts.js"></script> </div>
</body>
</html> <script src="js/index.js"></script>
</body>
</html>

Coin Flip - Script Codes CSS Codes

 p#results { font-size: 20px; font-weight: bold; -webkit-transition: 12s easing; }

Coin Flip - Script Codes JS Codes

var coin = ['Heads', 'Tails'];
function flip(){ var coinFlip = coin[Math.floor(Math.random()*coin.length)]; document.getElementById('results').innerHTML = coinFlip;
}
function refresh(){ document.getElementById('results').innerHTML = 'Flip Again!'
}
document.getElementById('dice').onclick = flip;
document.getElementById('reload').onclick = refresh;
Coin Flip - Script Codes
Coin Flip - Script Codes
Home Page Home
Developer Bradley Engelhardt
Username SquishyAndroid
Uploaded August 13, 2022
Rating 3
Size 2,142 Kb
Views 42,504
Do you need developer help for Coin Flip?

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!

Bradley Engelhardt (SquishyAndroid) Script Codes
Create amazing love letters 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!