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
you can use:
var input = document.getElementsByClassName("some-class")[0] alert(input.type); alert(input.name);