下拉菜单文字框 [英] Dropdowns & Textboxes

查看:99
本文介绍了下拉菜单文字框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

需要您的惊人帮助;)

我有一个进入页面,其中包含许多下拉列表&文本框.

我希望能够从下拉列表的DepreciationRate中选择一个值,例如0.5%,然后在成本"文本框中输入一个成本价格",当我这样做时,我希望能够进行快速计算并将答案放入另一个空文本中框,称为总折旧.

我已经尝试将DepreciationRate DDL中的选定值发送到文本框,然后使用该选项和Cost文本框从隐藏的文本框中进行计算,但是它不起作用.

这就是我的意思...

http://i1145.photobucket.com/albums/o506/MConnolly1991/Capture- 1.png?t = 1343123479 [ ^ ]

我的下拉列表也绑定到数据库.

多谢你们!感谢您的帮助.

Hey Guys,

Need your amazing help ;)

I have an entry page with a number of dropdownlists & textboxes.

I want to be able to select a value from the dropdownlist DepreciationRate e.g 0.5% then enter a Cost price into a Cost Textbox, when i do this, I would like to be able to do a quick calculation and place the answer into another empty text box called Total Depreciation.

I''ve tried sending the selected value from DepreciationRate DDL to a textbox, then do a calculation from a hidden textbox with that choice and the Cost textbox but it doesn''t work.

Here''s what I mean...

http://i1145.photobucket.com/albums/o506/MConnolly1991/Capture-1.png?t=1343123479[^]

My dropdownlists are bound to a database also.

Thanks guys! Appreciate your help.

推荐答案

您好,
尝试在Textbox的OnLostFocus事件中编写计算.
请参考以下链接:
http://stackoverflow.com/questions/1310902/asp-net-textbox-lostfocus-event [^ ]
http://stackoverflow.com/questions/3863927/lost-focus-method- for-asp-net-textbox [ ^ ]
http://stackoverflow. com/questions/384820/adding-javascript-to-the-onblur-property-of-an-asp-net-text-box-control [
Hi,
Try writing your calculation in OnLostFocus event of Textbox.
Refer the links below:
http://stackoverflow.com/questions/1310902/asp-net-textbox-lostfocus-event[^]
http://stackoverflow.com/questions/3863927/lost-focus-method-for-asp-net-textbox[^]
http://stackoverflow.com/questions/384820/adding-javascript-to-the-onblur-property-of-an-asp-net-text-box-control[^]



---Amit


这篇关于下拉菜单文字框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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