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]
A1WEBSITEPRO Social Media Pages
Here are my social media pages, lets hook up!