How to select a button id when the button in clicked injavascript/jquery
<p>I am new to javascript/jquery .
I have a small question.
I have some thing like the following in the java script file.</p>

<pre><code>&lt;button id="button1" onclick=click() /&gt;
&lt;button id="button2" onclick=click() /&gt;
&lt;button id="button3" onclick=click() /&gt;
</code></pre>

<p>so the click function looks like the follwoing</p>

<pre><code>click(id){


/do some thing
}
</code></pre>

<p>so my question is when ever the button is clicked how can we pass the button id to the function.</p>

<pre><code>&lt;button id="button1" onclick=click("how to pass the button id value to this function") /&gt;
</code></pre>

<p>how can we pass the button id like "button1" to the click function when ever the button is clicked..
I would really appreciate if some one can answer to my question..</p>

<p>Thanks,
Swati</p>
