JavaScript Simple True or False Script

Here is a little JavaScript true or false script that you can have some fun with. You can even develop further intricate programs off of this little script here. Enjoy!
https://www.youtube.com/watch?v=2pr3V55nP2Y&feature=youtu.be
[code]<html>
<head>
<title>Quiz</title>
</head>
<body>
<h1>Quiz</h1>
<div id="question">True or False: The sky is blue?</div>
<button onclick="truee()">True</button>
<button onclick="falsee()">False</button>
<script>
function truee(){
document.getElementById(‘question’).innerHTML="That is correct";
document.getElementById(‘question’).style.color="green";
document.getElementById(‘question’).style.textTransform="uppercase";
}

function falsee(){
document.getElementById(‘question’).innerHTML="That is not correct";
document.getElementById(‘question’).style.color="red";
document.getElementById(‘question’).style.textTransform="uppercase";
}
</script>
</body>
</html>[/code]

JavaScript Simple True or False Script was last modified: May 20th, 2017 by Maximus Mccullough
Summary
JavaScript Simple True or False Script
Article Name
JavaScript Simple True or False Script
Description
Here is a little JavaScript true or false script that you can have some fun with. You can even develop further intricate programs off of this little script here. Enjoy!
Author
Publisher
A1WEBSITEPRO LLC
Logo
How to Use JavaScript

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.