I think I'm close to getting this right but I can't figure out how to change the colour of my submit button when the user hovers over it, I'm very new too javascript so any help would be greatly appreciated
here is my code:
<html> <head> <title>JavaScript</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script> function getName(){ var name; name = window.prompt("Enter your name", ""); greeting = "User Information for " + name; var txt= document.getElementById('txtWelcome'); txt.innerHTML=greeting; } function over() { document.getElementById("Submit").style.background = 'Blue'; } function out() { document.getElementById("Submit").style.background = 'Yellow'; } </script> </head> <body onload="getName()"> <form class="basic_form"> <h1 id="txtWelcome"></h1> <p>Please input your login details</p> <fieldset> <label class="form_labels">Username:</label> <input class="form_fields" type="text" name="username"><br> <label class="form_labels">E-Mail:</label> <input class="form_fields" type="email" name="email"><br> <label class="form_labels">Password:</label> <input class="form_fields" type="password" name="password"> <input class="form_buttons" type="Submit" value="Submit"><br> </fieldset> </form> </body>