读取GridView选中的当前行JS代码

function GetCheckedRow() {
            var curRow;
            var items = document.getElementById('<%=gvwBaseData.ClientID%>').all;
            for (var i = 0; i < items.length; i++) {
                if (items[i].type == "checkbox") {
                    if (items[i].checked == true) {
                        curRow = items[i].parentNode.parentNode;
                        break;
                    }
                }
            }
            return curRow;
        }

posted @ 2013-04-19 11:23  冲锋撞大树  阅读(143)  评论(0编辑  收藏  举报