获取TextBox中按钮的值 [英] Get value of button in TextBox
本文介绍了获取TextBox中按钮的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有一个文本框,我有一个按钮。按钮值为1.我想使用JavasScript在文本框中显示按钮的值。
解决方案
你可以这样做 -
< pre lang =Javascript> document .getElementById( YouTextboxId)。value = document .getElementById( YouButtonId)。value;
希望,它有帮助:)
There is a single textbox and i have a button. Button value is 1. I want to display the value of button in textbox using JavasScript.
解决方案
You may do like this-
document.getElementById("YouTextboxId").value=document.getElementById("YouButtonId").value;
Hope, it helps :)
这篇关于获取TextBox中按钮的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文