Edrol97
Silver Coder
I want to make a fact generator:
Here's the code. It's currently not working, and not sure what I'm doing wrong.
All help appreciated.
Thanks,
Eliot
Here's the code. It's currently not working, and not sure what I'm doing wrong.
All help appreciated.
Thanks,
Eliot
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta property="og:image" content="img/background/QSS.svg" />
<title>Facts R Facts</title>
<link rel="icon" type="image/x-icon" href="img/background/Quav.svg" />
<link rel="stylesheet" href="mainstyle.css" />
<link rel="stylesheet" href="ToryGraph.css" />
</head>
<body>
<div class="wrapperfact">
<button id="red" onclick="newFact()">And your next dose of truth</button>
<div class="fact-box">
<div class="fact-text" id="fact">Loading fact...</div>
</div>
</div>
<script src="Fact.js"></script>
</body>
</html>
JavaScript: