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!
<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>
JavaScript Simple True or False Script was last modified: May 20th, 2017 by
Tip: Click on images to make them larger.
If you find anything wrong on this page or need further assistance please comment below or contact me.
🙂
Please like, share and subscribe.
Advanced Programming Made Easy
I hope you enjoyed the article. If I was able to help you please consider a tip for the content.
One Time Tip
Reoccuring Tips
Cool People Share:
