请教一个问题,asp.net 对表格的操作 如下:
grid行上有 两个可以入力的文本框A和B,还有C文本框,要求在A,B内输入之后进行乘积计算,焦点离开后结果放在C里面。这个功能怎么实现阿!是否要写脚本!
grid行上有 两个可以入力的文本框A和B,还有C文本框,要求在A,B内输入之后进行乘积计算,焦点离开后结果放在C里面。这个功能怎么实现阿!是否要写脚本!
解决方案 »
- 一个很怪很老的问题,Page_Load执行两次?
- asp.net mvc 问题
- VS2008新建解决方案文件夹问题
- 怎样在给ACCESS加用户名、密码?
- 关于AJAX 评级控件的使用的问题 我分数不多了,请各位帮帮忙
- 开发继承自HyperLink控件的自定义控件的问题.
- datagrid中HyperLink如何弹出定制的窗口
- javascript 如何开发多语言
- 为什么表单在提交成功后没有自动清除。
- 麻烦大家给一个ASP.NET学习资料的下载地址。
- 关于 DataList 中 嵌套 Datalist 的取值问题!
- 谁搞过这样SQL数据库复制(比如数据库事务复制,快照复制等),我想在两台服务器之间实现数据同步,但是无法实现,报错说总是连接不上Subcr 另一台服务器,谁搞过请赐教,或者贴个图(步骤方案)出来,谢谢啊
{
var price= parseFloat((document.getElementById(txt_price)).value);
var qty=parseFloat((document.getElementById(txt_qty)).value);
var amt=price*qty;
(document.getElementById(txt_amt)).value=Math.round(amt*100)/100;
}
this.Txt_Qty.Attributes.Add("onblur", "MyAmt('" + Txt_Price.ClientID + "','" + Txt_Qty.ClientID + "','" + Txt_Amt.ClientID + "')");
{
var a = enent.srcElement;
var b = a.parentNode.parentNode.cells[n].childNodes[m];
var c = a.parentNode.parentNode.cells[i].childNodes[m];
//剩下的就不用我写了吧
}离开B焦点()
{
var a = enent.srcElement;
var b = a.parentNode.parentNode.cells[n].childNodes[m];
var c = a.parentNode.parentNode.cells[i].childNodes[m];
//剩下的就不用我写了吧
}
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
TextBox Txt_Price = (TextBox)e.Item.FindControl("Txt_Price");
TextBox Txt_Qty = (TextBox)e.Item.FindControl("Txt_Qty");
TextBox Txt_Amt = (TextBox)e.Item.FindControl("Txt_Amt"); Txt_Price.Attributes.Add("onblur", "MyAmt('" + Txt_Price.ClientID + "','" + Txt_Qty.ClientID + "','" + Txt_Amt.ClientID + "')");
Txt_Qty.Attributes.Add("onblur", "MyAmt('" + Txt_Price.ClientID + "','" + Txt_Qty.ClientID + "','" + Txt_Amt.ClientID + "')");
}
}
{
if (e.Item.ItemType == ListItemType.Item ¦ ¦ e.Item.ItemType == ListItemType.AlternatingItem)
{
TextBox Txt_Price = (TextBox)e.Item.FindControl("Txt_Price");
TextBox Txt_Qty = (TextBox)e.Item.FindControl("Txt_Qty");
TextBox Txt_Amt = (TextBox)e.Item.FindControl("Txt_Amt"); Txt_Price.Attributes.Add("onblur", "MyAmt('" + Txt_Price.ClientID + "','" + Txt_Qty.ClientID + "','" + Txt_Amt.ClientID + "')");
Txt_Qty.Attributes.Add("onblur", "MyAmt('" + Txt_Price.ClientID + "','" + Txt_Qty.ClientID + "','" + Txt_Amt.ClientID + "')");
}
}
If e.Item.ItemType = ListItemType.AlternatingItem Or e.Item.ItemType = ListItemType.Item Then
Dim Txt_Price As New TextBox
Dim Txt_Qty As New TextBox
Dim Txt_Amt As New TextBox Txt_Price = CType(e.Item.FindControl("Txt_Price"), TextBox)
Txt_Qty = CType(e.Item.FindControl("Txt_Qty"), TextBox)
Txt_Amt = CType(e.Item.FindControl("Txt_Amt"), TextBox) Txt_Price.Attributes.Add("onblur", "MyAmt('" + Txt_Price.ClientID + "','" + Txt_Qty.ClientID + "','" + Txt_Amt.ClientID + "')")
Txt_Qty.Attributes.Add("onblur", "MyAmt('" + Txt_Price.ClientID + "','" + Txt_Qty.ClientID + "','" + Txt_Amt.ClientID + "')") End If
End Sub