I would like to know if there is a way to get the name of a element by its class or id.
for exemple retur
Try tagName :
tagName
var input = document.getElementsByClassName("some-class")[0]; alert(input.tagName);
JSFiddle: http://jsfiddle.net/PG656/1/