文本框文字已更改 [英] textbox text Changed
本文介绍了文本框文字已更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我在页面上使用了将近十个文本框.在那十个中,我需要使用五个文本框和一个仅用于计算的组合框.三个文本框和一个组合框用于输入.二是显示输出.当我输入输入到textbox1和combobox时,它将显示在textbox5和texbox4中.反之亦然,文本框2和3.
Hi All,
I used nearly ten textbox on a page. In that ten i need to use five textbox and one combobox only used for my calculation. Three text box and one combox used to give a input. Two are shows the out put. When i enter input to textbox1 and combobox it shows out in textbox5 and texbox4. vice versa for textbox 2 and 3.
tamil=textbox1.text
english=textbox2.text
maths=textbox3.text
attendancemark(2,4,6,8,10)=combobox
avg=tamil+english+maths/3
textbox4.text=avg
textbox5.text=avg+combobox
Protected Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
If TextBox1.Text = "" Then
TextBox1.Text = 0
ElseIf TextBox2.Text = "" Then
TextBox2.Text = 0
ElseIf TextBox3.Text = "" Then
TextBox3.Text = 0
ElseIf DropDownList1.SelectedItem.Text = "" Then
DropDownList1.SelectedItem.Text = 0
End If
a = TextBox1.Text
b = TextBox2.Text
c = TextBox3.Text
d = DropDownList1.SelectedItem.Text
sum = a + b + c / 3
subtract = sum + d
TextBox4.Text = sum
TextBox5.Text = subtract
End Sub
我该如何在Java脚本中做这件事.............
谢谢你,请帮我.
S.Priyan
how can i do tis in java script.............
Please help me for this thank you.
S.Priyan
推荐答案
我认为您更改的事件未触发.
除非将自动发布设置为true,否则您将需要处理通过JavaScript更改的文本.
I presume your changed event is not firing.
You will need to handle text changed via JavaScript unless you set auto post back to true.
这篇关于文本框文字已更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文