How to call a Javascipt function after pressing Enter key in Input type="text"?
<p>How do I call a function, <code>get()</code>, which will retrieve meaning of a word typed in a text box after the user presses the Enter key?</p>

<p>I am adding my code below, nothing worked till now; please please add your corrections to the code, I know the code is too poor.</p>

<pre><code>&lt;script type="text/javascript" src="jquery.js"&gt; &lt;/script&gt;


&lt;script type="text/javascript"&gt;

function get() {
$('#meaning').hide();
$.post('data.php', { name: form.wordfield.value }, 
function(output)   {

$('#meaning').html(output).fadeIn(1000);
});
}



&lt;/script&gt;



&lt;/head&gt;
&lt;body&gt;

&lt;div id="container" style="width:100%"&gt;
&lt;div id="header"&gt;

&lt;ul&gt;

&lt;!--  &lt;li&gt;&lt;a href="#"&gt;Home&lt;/a&gt; &lt;/li&gt;--&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;div id="logo" style="width: 10%; float:left; position:fixed; top:0px;                 z-index:-1;"&gt;         &lt;img src="logo.gif"&gt;&lt;/img&gt;&lt;/div&gt;
&lt;p&gt;
&lt;div id="searchform"&gt;
&lt;form name="form" &gt;

&lt;input type="text" name="wordfield" onKeyup="get();"&gt;&lt;input type="button"    value="Translate" onClick="get();"&gt; &lt;/form&gt;
&lt;/div&gt;
&lt;div id="meaningbox"&gt;
&lt;/div&gt;
&lt;div id="meaning"&gt;

&lt;/div&gt;
&lt;/p&gt;
&lt;div id="ad" style="width: 10%;float:right;"&gt;&lt;!-- add section --&gt;&lt;/div&gt;
&lt;div id="footer"&gt;footer div goes here &lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
