0
How can I put an Eventlistener on a Button inside a form and div Element?
at the Moment ja Code is document.getElementById("LoginButton").addEventListener("Click", login); and the Order in my HTML Code is <div id="MainView"> <div id="innerMainView"> <form name="loginName"> <input type="text" size="20" name="Username"> <br> <Button type="button" id="LognButton">Login</Button> </form> </div> </div>
1 Antwort
+ 4
Typo in id="LoginButton".
Btw i suggest you going through onsubmit event listener of form, for the same purpose you are trying to attach a click listener to button.