I’m trying to get id of the span tag that is M24 by using Javascript function.
<a HREF="javascript:void(0)"><font color="#000080"><span id=M24>2012-2013</span></font
color="#000080"></a>
I m using the following code but its not returning any value:
<SCRIPT LANGUAGE="javascript">
function clickHandler()
{
var xid=document.getElementID(this);
alert("Span id is "+xid);
}
</SCRIPT>
rewrite the function like the one below
To find out multiple span id’s
instead of above functions you can simply do this, rewrite your function like this
and add your span’s like this