Hi I have a text box with an input field using the following HTML:
<input class="user-input" type="text" name="userAttempt" value="" >
I want to check the value entered by running the following when a submit button has been pressed:
var userAttempt = document.getElementsByClassName("user-input").value; userAttempt = userAttempt.toLowerCase(); console.log("User Input was: " + userAttempt);
However this is returning an undefined variable.
Can anybody tell me where I am going wrong?
I have NO CLASS APPLIED within the property inspector, just within the input field HTML inside the text box.