Get the value of input text with document.getElementsByClassName
<p>I'm doing some code, where i want to get the value of an input text introduced by the user</p>

<p><strong>Get the value</strong></p>

<pre><code>       var inputTextValue = document.getElementsByClassName("something");        
       alert("inputTextValue.value);
</code></pre>

<p><strong>Creation of the input text</strong></p>

<pre><code> function createHour(){
    var hour = document.createElement("INPUT");
    hour.id = "something";
    defineButtonHour(hour);
    //after: -code to append to div
  }

function defineHour(hour) {
  hour.className = "something";
}
</code></pre>

<p>The alert just print undefined.</p>