Accesing the id attribute of the select tag from jquery
<p>I am looking for a way to access the id attribute of the select tag from jquery.</p>

<p>say i have a select tag on the form : form.php</p>

<pre><code>&lt;select id="testid"&gt;
&lt;option value="1"&gt;1&lt;/option&gt;
&lt;option value="2"&gt;2&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>from jquery I can access the option value as <code>$(this).attr("value")</code>. But <code>$(this).attr("id")</code> gets undefined.</p>

<p>By giving the option tag some id attribute values it works. But, is there a way around to access the id of the select tag thru <code>$(this)</code> object</p>

<p>Thanks for any help</p>
