Javascript input.value not working : <p>I'm using the Domready.js library as an alternative to the jQuery <code>document.ready()</code> function and inside the ready function I have this code:</p>

<pre><code>DomReady.ready( function() {

    /*
        DOM elements
    */ 
    var tel_input = document.getElementsByClassName( 'tel-input' );

    /*
        When .tel-input is focused, `06` should be added automatically
    */
    tel_input.onfocus = function() {
        tel_input.value = '06';
    };

});
</code></pre>

<p>This code doesn't do anything and the console doesn't throw an error. When putting an alert in the <code>tel_input.onfocus = function() {</code> it works, but inserting a value when the input is focused doesn't do anything.</p>
