Hiya, this is my first post - I'll try to make sure I'm doing things correct!
I'm trying to create a random text generator, I've got the random text generating part down, but after I click the button and get the random text, I lose my button so I can't continue to generate random text. Help?
<p id="generator">Generate a random fact</p>
<button onclick="myFunction()">Try it</button>
var r_text = new Array ();
r_text = "Give a homeless man a gift card";
r_text = "Hold the door for a stranger";
r_text = "Pay for a stranger's lunch";
r_text = "Compliment the next person you see";
r_text = "Take your neighbor's dog for a walk";
r_text = "Send greeting cards to random addresses";
r_text = "Load a vending machine with money";
var i = Math.floor(7*Math.random())
Here is a snippit if that doesn't work:
Also, any resources or directions you can provide would be great, my knowledge is good in some areas, and I'm a complete idiot in other areas!