jenner-lin

//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; 
        }    

分类:

技术点:

相关文章:

  • 2021-12-23
  • 2022-01-18
  • 2022-01-10
  • 2021-05-31
  • 2021-12-16
  • 2021-12-16
  • 2021-12-16
猜你喜欢
  • 2022-01-02
  • 2022-01-02
  • 2021-12-16
  • 2021-08-14
  • 2022-02-11
相关资源
相似解决方案