I'm doing some code, where i want to get the value of an input text introduced by the user
Get the value
var inputTextValue = document.getElementsByClassName("something");
alert("inputTextValue.value);
Creation of the input text
function createHour(){
var hour = document.createElement("INPUT");
hour.id = "something";
defineButtonHour(hour);
//after: -code to append to div
}
function defineHour(hour) {
hour.className = "something";
}
The alert just print undefined.