A while ago I was making some test in Javascript, and played with a code to get the text of all elements with a certain class, Now I was trying to make something like this
If you are lucky and need to care only for recent browsers, you can use:
document.querySelectorAll('input[type=text]')
"recent" means not IE6 and IE7