与ajax有关 [英] related to ajax

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

问题描述

我在更新面板中使用gridview.

一栏中有用户输入的数量和价格列,另一列是amt.

我想在运行时计算金额吗?

在运行时输入值.

I''m using gridview in update panel.

In one column there is user input qty and rate col, and another col is amt.

I want to calculate amount at run time, is it possible?

Values are entered at run time.

推荐答案

您可以通过在Qty&上使用onkeypress事件在该过程中使用javascript.为文本框评分.编写js函数以进行计算&在两个文本框中的onkeypress事件中调用该函数.优点是js在客户端运行.作为参考,请单击此将JavaScript事件附加到网格视图绑定字段 [^ ]
You can use javascript for that process by using onkeypress event on the Qty & Rate textboxes. Write a js function to calculation & call that function in onkeypress event on both textboxes. Advantage is the js is working at client side. For reference click this one Attach JavaScript Events to Grid View Bound Field[^]


可以.但是,确切的时间在运行时将取决于您所使用的方案.您还能描述更多吗?
Yes can be. But when exactly during runtime would be decided on the scenario you have. Can you describe bit more?


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

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