(solved) help changing font color on mouse over. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

(solved) help changing font color on mouse over.

For my first learning project, I'm building a choose-your-own-adventure story website. Something readers can interact with. I'm working on the structure now. I'm working in html and javascript (badly). I haven't started learning any other languages yet. I want the page to react to the choices the reader makes. At decision points there will be 2 buttons, and I want to have the background color and font color for the page to change when the reader hovers over each button. I have successfully gotten the background color to change at mouseover (and change back at mouseout) but I cannot figure out how to make the page's font color change and revert at mouseover and mouseout. Seems like it should work the same way but (expletive deleted). I have buttons in a form coded like this: <form align="center">Which way will you go?<br> <input type="submit" value="Can it, Maureen" onmouseover="littleGoth()" onmouseout="revert1()"/>-----<input type="submit" value="You're right, Maureen"/> </form> And the script l

4th Oct 2018, 11:02 PM
Eric Landreneau
Eric Landreneau - avatar
4 Answers
+ 3
Awesome! Now that you've found the answer, you might consider labeling it as [Solved] in the title. It'd help us answer other questions faster :)
5th Oct 2018, 3:31 AM
Kishalaya Saha
Kishalaya Saha - avatar
+ 2
Aw, poo, nevermind. I figured it out. I lied; apparently i did not in fact try the style "color". It works now. 😁
5th Oct 2018, 12:00 AM
Eric Landreneau
Eric Landreneau - avatar
+ 1
Groovy. Job done!
5th Oct 2018, 4:25 AM
Eric Landreneau
Eric Landreneau - avatar
0
Thanks! :)
5th Oct 2018, 4:35 AM
Kishalaya Saha
Kishalaya Saha - avatar