e.g. if i have this:
whatever
then let say in jQuery, how can I find out that the dom element with id \"mydiv\"
$('#mydiv').get(0).nodeType if you know there's only one element. The selector object can contain an array of objects.
.get() returns the array of DOM objects, the parameter indexes. nodeType is a property exposed by the DOM that tells you what the type of the DOM node is. Usually as a String in all caps IIRC.
CORRECTION nodeType gives you an INT corresponding to a nodeType. tagName is what you want.