mvc 2,输入控制,类型=" text" [英] mvc 2,intput control with type="text"

查看:103
本文介绍了mvc 2,输入控制,类型=" text"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友!
mvc 2中的
,这是一个输入控件,类型=text

我希望通过客户端获取文本来制作一个ajax调用,问题是所实现的文本总是为null,很快就想通过javascript或jquery获取文本,帮帮我..........

hello friends!
in mvc 2,here is a intput control with type="text"
and i want to get its text via client side to make an ajax call, the issue is that the text achieved is always null,shortly want to get the text via javascript or jquery ,help me..........

推荐答案

获取价值

For Get the Value
<script type="text/javascript>">


document )。ready( function ()
{
var getText =
(document).ready(function() { var getText=


#txtId)。val();
});
< / script>
("#txtId").val(); }); </script>





请确保您必须包含jQuery插件。你可以从这里下载

http://jquery.com/download/ [ ^ ]

希望这有助于



Please make sure that you must include jQuery plugin. You can download it from here
http://jquery.com/download/[^]
Hope this helps


这篇关于mvc 2,输入控制,类型=&quot; text&quot;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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