How can I check which textbox is selected in javascript?
<p>I have the following html code:</p>

<pre><code>...
// javascript function
if(the user press the user box) {
     // do some action
}
...
user: &lt;input type="text" id="user" name="user" /&gt;
Email: &lt;input type="text" id="email" name="email" /&gt;
</code></pre>

<p>There are 2 input boxes. When the user presses either input, it will call a JavaScript function to do something. I also want do some action when the user does something in the user box. However, I don't know how to set up the condition. </p>

<p>Can anyone help me? </p>
