惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
云风的 BLOG
云风的 BLOG
Microsoft Security Blog
Microsoft Security Blog
WordPress大学
WordPress大学
GbyAI
GbyAI
C
Check Point Blog
M
MIT News - Artificial intelligence
T
The Blog of Author Tim Ferriss
Jina AI
Jina AI
博客园 - 【当耐特】
U
Unit 42
月光博客
月光博客
腾讯CDC
Y
Y Combinator Blog
小众软件
小众软件
博客园_首页
Last Week in AI
Last Week in AI
酷 壳 – CoolShell
酷 壳 – CoolShell
The GitHub Blog
The GitHub Blog
博客园 - 聂微东
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
MongoDB | Blog
MongoDB | Blog
博客园 - Franky
T
Tailwind CSS Blog

博客园 - jenner

js 更改 onclick 事件 - jenner js 去除字符串中重复的字符 - jenner - 博客园 javactript关闭窗体,刷新父窗体....... - jenner - 博客园 js实现动态级联计分,级数无限制 - jenner - 博客园 winform dgv右键选择 - jenner - 博客园 DataGrid 二维表头 DataGrid导出到Excel or word javascript 对datagrid的一些操作 - jenner - 博客园 DataView 属性操作 - jenner - 博客园 javascript 判断整数 javascript控制服务器控件-js操作CheckBoxList实现全选、反选 css控制字数(控制宽度) 网站变黑白 漂浮div窗体,带停止 111 test 使用QuickCHM软件轻松编译CHM格式的文件 遍历treeView的所有节点 TreeView第三种状态的另类实现
js 获取选中的checkbox的行的其他值
jenner · 2009-02-17 · via 博客园 - jenner

//aspx.cs
        protected   void   GridView1_RowDataBound(object   sender,   GridViewRowEventArgs   e)
        {
                if   (e.Row.RowType   ==   DataControlRowType.DataRow)
                {
                        CheckBox   chkSelect   =   (CheckBox)e.Row.FindControl( "chkSelect ");
                        chkSelect.Attributes.Add( "onclick ",   "show   ( ' "   +   e.Row.RowIndex   +   " ') ");
                }
        }
//aspx页添加脚本
        function   show(index) 
       { 
             var   table   =   document.getElementById( "GridView1 "); 
             for(var   i   =   1;   i   <   table.rows[0].cells.length;   i++)

             { 
                        alert   (table.rows[index   +   1].cells[i].innerText); 
             }

             return   false; 
        }