how to get the value of an control
来源:互联网 发布:qq翻译软件下载 编辑:程序博客网 时间:2024/04/29 09:02
If a html page contains what likes:
<table>
<tr>
<td>
Enter Key Here ->
<input type="text" id="key" name="key"
onkeyup="convertToDecimal( );">
</td>
</tr>
</table>
<br />
<table>
<tr>
<td colspan="5" style="border-bottom:solid black 1px;">
Key Pressed:
<input type="text" readonly id="keypressed">
</td>
</tr>
</tabl
<tr>
<td>
Enter Key Here ->
<input type="text" id="key" name="key"
onkeyup="convertToDecimal( );">
</td>
</tr>
</table>
<br />
<table>
<tr>
<td colspan="5" style="border-bottom:solid black 1px;">
Key Pressed:
<input type="text" readonly id="keypressed">
</td>
</tr>
</tabl
We can get keys using getElementById( keyId ),
var key = document.getElementById("key");
var keypressed = document.getElementById("keypressed");
And we can put the value of key into the value of keypressed like this:
keypressed.value = key.value;
So we can get the value of a <input> control by:
myvalue = document.getElementById("keyId").value;
- how to get the value of an control
- How to get the value of one specified item
- How to get the published properties of an persistent object
- How to combine the value of multiple hashes within an array by the same key
- How to show/hide a control in the Column's DataItemTemplate based on the value of another control
- How To Retrieve the URL of a Web Page from an ActiveX Control
- How to get the default value in the paramter block description of 3ds max
- How to get the DOM of a WebBrowser control from a window handle (VB6)
- How to get value of the person or group type via CAML Query js
- uiview 某点返回 色值 How to get the color of a pixel in an UIView?
- 得到坐标的颜色值 How to get the color of a pixel in an UIView?
- flex/in the datagrid,how to get the new value of cell in the datagrid after edit
- How to get control of your time and your life
- How to get control of your time and life
- How to get control of your time and your life
- 《How to Get Control of Your Time and Your Life》
- How to get the 2D coordinate of the max or min value in matrix in matlab
- In RadGrid, How to get the control inside usercontrol
- SSH框架搭建
- 离成功多远?
- ATl中字符转换宏
- Hibernate+ehcache二级缓存技术
- HRESULT 函数返回值详细介绍
- how to get the value of an control
- UNIX环境下如何应用消息队列实现进程间通信
- 在ASP.NET中,发现的关于string转换的一个小Bug
- 八数码实验报告
- Oracle在线文档网址
- Hibernate中几个xml文件的说明
- _MBCS与_UNICODE环境编译系统配置
- 特殊字符
- zoj计算几何