如何使用 Prototype 获取输入值? [英] How can I Get input value with Prototype?

查看:50
本文介绍了如何使用 Prototype 获取输入值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下输入,周围没有任何形式:

I have the following input without any form around it:

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

如何使用原型获取输入值?我尝试使用 alert($('tb_website static').value);,但它不起作用.

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

推荐答案

alert($$('[name="td_website static"]')[0].value)

这篇关于如何使用 Prototype 获取输入值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆