Why this Javascript code does not work in Firefox?
<p>Javascript</p>

<pre><code>var keycode = (event.keyCode ? event.keyCode : event.which);
if(keycode == '13'){
    button = document.getElementById("botao");
    button.click();  
}
</code></pre>

<p>HTML</p>

<pre><code>            &lt;table border="1"&gt;
            &lt;tr style="height:40px;"&gt;

            &lt;td&gt;
            &lt;input type="text" size="59" onkeypress="buttonclick()" id="texto" name="texto" /&gt;
            &lt;/td&gt;

            &lt;td&gt; &lt;input type='button' value='Enviar' id="botao" name="botao" onclick='return addnobanco();' /&gt; &lt;/td&gt; &lt;!-- send js --&gt;
            &lt;/tr&gt;
        &lt;/table&gt;
</code></pre>

<p><b>EDIT</b> I have a button and a textbox, if I type and click in the button it will send the message, but in js when I hit the button Enter(in my keyboard) it should perform a button.click, get it? In chrome and iE works perfectly but in Firefox nothing happens when I hit enter, but if click myself in the button it works.</p>
