Given the snippet below, let just say that elem[1] is a text input. How do I get the the type of input which would be "text", and the value that the text input contains?
Thanks in advance,
Troy
Code:
var elem = document.body.getElementsByTagName('*');
var getIt = elem[1].id;
alert(getIt); //gives me the id
alert(getIt.type); //does not work, how do I get to type?
alert(getIt.value); //does not work, how do I get to value?
Thanks in advance,
Troy