本文介绍了如何在mvc视图中添加文本框中给出的两个数字(.cshtml)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

这里我想用onkey函数添加两个文本框值。



hi to all,
Here i want to add two textbox value using onkey function.

@Html.TextBoxFor(model => model.value1, new { @class = "form-control control-text " })







@Html.TextBoxFor(model => model.value2, new { @class = "form-control control-text " })



above is my two text box how to write script for above two text box and adding functionality.

推荐答案

@Html.TextBoxFor(model => model.value1, new { @class = "form-control control-text", @id= "txtBox1" })






and

@Html.TextBoxFor(model => model.value2, new { @class = "form-control control-text", @id= "txtBox2" })





现在在jQuery中,



Now in jQuery,

alert(




这篇关于如何在mvc视图中添加文本框中给出的两个数字(.cshtml)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-01 20:26