I\'m matching ASP.Net generated elements by ID name, but I have some elements which may render as text boxes or labels depending on the page context. I need to figure out wh
This the best way to Get the element type
function tgetelementType( elmentid )
{
var TypeName = $('#' + elmentid).get(0).tagName;
var TypeName2 = $('#' + elmentid).get(0).type;
if($('#' + elmentid).get(0).tagName== "INPUT")
{
return $('#' + elmentid).get(0).type.toUpperCase()
}
else
{
return $('#' + elmentid).get(0).tagName.toUpperCase() ;
}
}