Fortune teller app

I’m trying to get a fortune telling app to display fortune in a text box when I click on the image of the crystal ball. I know the JavaScript program works because it works in my wix website, but I’d rather make my own website and have the fortune telling app. I think I am in way over my head. Here is the JavaScript Code.