How can I Get input value with Prototype?

3logy picture 3logy · Mar 8, 2011 · Viewed 31.2k times · Source

I have the following input without any form around it:

<input type="text" value="myValue" name="td_website static" class="td_inner_input">

How can I get the Input value with prototype? I tried to use alert($('tb_website static').value);, but it doesn't work.

Answer

Jaroslav Jandek picture Jaroslav Jandek · Mar 8, 2011
alert($$('[name="td_website static"]')[0].value)