文本已更改文本框的事件

编程入门 行业动态 更新时间:2024-10-25 06:25:26
本文介绍了文本已更改文本框的事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

嗨... 我很想MVC.In查看有两个文本框。当我将更改第一个文本框值时,第二个文本框值也会根据第一个文本框值而改变。那么如何在mvc中为文本框编写文本更改事件。 谢谢...

解决方案

这是一个javascript问题。您可以使用jquery为文本更改设置事件,并同时更改其他控件中的文本。 MVC与它毫无关系,它是创建HTML和javascript的引擎,在这种情况下,你想直接编写javascript。 另一个人给出了错误的答案。这就是你要做的:

('#eventType')。change(function(){ ( '#文本2')。文本(

Hi... I am begginer to MVC.In View there are two textboxs.When i will change first textbox value at that time second textbox value also alter depending on first textbox value..So How to write text change event for textbox in mvc. Thanks...

解决方案

This is a javascript question. You can use jquery to set up events for text change, and to change the text in your other control at the same time. MVC has literally nothing to do with it, it's an engine for creating HTML and javascript, and in this case, you want to write the javascript directly. The other person has given a wrong answer. This is what you'd do:

('#eventType').change(function() {

('#text2').text(

更多推荐

文本已更改文本框的事件

本文发布于:2023-11-03 16:05:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1555522.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文本框   文本   事件

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!