There are some other problems to address. For example, I get this error in the console:
index.html?editors=1010:121 Uncaught ReferenceError: getRandomColor is not defined
But it is not clear to me why. It is defined, right before it’s call, and appears to work. But if I move that function definition out to the global scope, the error disappears.
Also, the id for one of your buttons is “button”. That is bad practice. What if you came back a year from now to your program and needed to add more buttons? Or someone else had to debug it and figure out what it is? Names should be descriptive. Something like “quote-button” would be better.
Looking at your code, there are two seperate AJAX calls to the quotesondesign.com site. These are doing the same thing so they should be combined. All of this should be wrapped in a function.There is a principle in programming - D.R.Y. - Don’t Repeat Yourself. It’s not always possible to follow perfectly, but it is a good goal.
I would consider having a function like newQuote() and that would make the API call and output the new quote to the string. You would call that function at the start of the program and again inside the click handler for the button.