在javascript中获取文本框数据 [英] Getting the textbox data in javascript

查看:168
本文介绍了在javascript中获取文本框数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一点帮助


如何在javascript编程中获取文本框数据


我的示例代码是


hi i am need small assistance that


how to get the textbox data in the javascript programming


and my sample code is


text: ghost.children(".ghost-content").html()+"--"+Some textbox  Content"




在此行中,我需要获取一些编写的文本框内容,所以请给我一个想法以获取此

谢谢q




here in this line i need to get the some textbox content which was written so please give me a idea to get this

thanks q

推荐答案

以下Javascript函数为您提供了文本框数据.
following Javascript function gives you textbox data.
function getData()
{
 alert(document.getElementById("textBoxName").value)
}


try:
try :
var text=document.getElementById('<%=txtbox1.ClientID%>').value;


首先学习javscript基础知识以及如何调用js函数,请看以下内容,您可能会有所了解

http://msdn.microsoft.com/en-us/library/aa479011.aspx [ ^ ]

http://forums.asp.net/t/1117189.aspx/1 [ ^ ]


first learn javscript basics and how to call js functions , have a look at the following , you may get some idea

http://msdn.microsoft.com/en-us/library/aa479011.aspx[^]

http://forums.asp.net/t/1117189.aspx/1[^]


使用以下JavaScript代码:
Use the following JavaScript Code :
var S = TextBoxName.Value();
alert(s);


这篇关于在javascript中获取文本框数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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