gridview中的javascript [英] javascript in gridview

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

问题描述

我有一个带有模板字段标签和复选框的gridview。标签包含金额。每当我选中复选框时,都应该添加相应的标签值,并且应该使用 javascript 将结果输出到gridview之外的标签中。可能吗?如果有人知道,请帮助一个例子。

Hi, I''ve a gridview with template fields label and checkbox. label contains amount. whenever i''m checking the checkbox, the corresponding label values should be added and should get the result in a label which is outside the gridview by using javascript. Is it possible? If anybody knows, kindly help with an example.

推荐答案

jsFiddle上的结帐示例 http: //jsfiddle.net/TdSCX/ [ ^ ]



您需要使用jQuery为GridView的复选框添加事件处理程序,如下所示



Checkout sample on jsFiddle http://jsfiddle.net/TdSCX/[^]

You need to add event handler for checkboxes of GridView using jQuery as below


(function(){
(function(){


' table#GridView1 tr td input [type =checkbox]')。click(function(){
var finalTotal = parseFloat(
('table#GridView1 tr td input[type="checkbox"]').click(function(){ var finalTotal = parseFloat(


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

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