cheechm
10-19-2008, 08:16 PM
Hi,
I am using jQuery and I want to get the id of the element clicked.
So I do this:
function get_id(id) {
alert(id);
}
<a href="javascript:get_id(this.id);" id="test">Test</a>
That returns "undefined". What is the problem?
Thanks
I am using jQuery and I want to get the id of the element clicked.
So I do this:
function get_id(id) {
alert(id);
}
<a href="javascript:get_id(this.id);" id="test">Test</a>
That returns "undefined". What is the problem?
Thanks