I cannot for the life of me figure out how to make a reset button that actually resets everything. I am just trying to get the text to reset and the buttons to reappear once clicked the reset button is clicked because when the buttons are pressed they disappear.
this is my code:
<!DOCTYPE html>
<html>
<body>
<h2>A Robbery in Ye Ol’ English!(Great Britian, 1784)</h2>
<p id=”demo”>Random Rapscalion: I am robbing thee, empty the compartments of thy pantoloons!</p>
<p id=demo1 style='”display.none”>Random Rapscalion: I am robbing thee, empty the compartments of thy pantoloons!'</p>
<button id=button1 type=”button” onclick=’document.getElementById(“button1”).style.display = “none”
onclick=document.getElementById(“demo”).innerHTML = “Random Rapscalion: How dare thee to refuse my request! You have left me no choice but to force thyself to empty thy pockets by force! Outcome:You were robbed of all of your precious money and materials and now have dozens of wounds.”‘>I refuse to comply to thy with such an utterly rude request.
<button id= button2 type=”button” onclick=’document.getElementById(“button2”).style.display = “none”
onclick=document.getElementById(“demo”).innerHTML = “Random Rapscalion: I shall thank thee for complying with such a request, so I shall let oneself keep half of thy riches. As I understand how much of an inconveinence this interaction has been, I shall let thee continue with thy day as long as thee shall not report this interaction to the local law enforcement. Outcome:You were able to keep half of your precious money and materials and were unharmed Ending:Goodish”‘>Oh Great Heavens! As I would assume thee shall use force to get thy wants, which in this case would be my precious riches, so I shall comply with thy request in hope of my life being spared!
<button id=button3 type=”button” onclick=’document.getElementById(“button3”).style.display = “none”
onclick=document.getElementById(“demo”).innerHTML = “You: HAW HAW HAW HAW! Folk like I uses a musket for household defensement! Thy puny shank is unable to commit any harmful actions against folk with muskets. Exit thou street of residence before oneself is force to use said musket. Random Rapscalion: OH GREAT HEAVENS! It has appeared you have outwitted me and thouself appears to be at a disadvantage. I shall comply with thy request to keep my life! Outcome: You kept all of your precious money and materials with no wounds, best ending”‘> OH MY GOODNESS GRACIOUS! I shall retreat to my location of residence as it appears thyself has a shank and no projectile weapon. </button>
<button id=”button4″ type=”reset” onclick=’document.getElementById(“demo”).innerHTML = “Random Rapscalion: I am robbing thee, empty the compartments of thy pantoloons!”‘> this is a reset button
</body>
</html>
I’ve tried basically everything I could find on the internet but it all just resulted in the button doing nothing, the code that I have is closest I could get.
Jesse Sult is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.