JavaScript获取GridView中用户点击控件的行号,列号
人气:0复制代码 代码如下:
<asp:ImageButton ID="BtnMailaddress" runat="server" ImageUrl="../img/Search.gif" ImageAlign="Top" TabIndex="0" OnClientClick = "javascript:openImage(this);return false;"/>
function openOkurisakiPopup(obj)
{
var rowIndex,c
o = obj
while(o.tagName != "TD")
o = o.parentNode
if(o.tagName != "TD") return
c = o.cellIndex
while(o.tagName != "TR")
o = o.parentNode
if(o.tagName != "TR") return
rowIndex = o.rowIndex
}
行号:rowIndex
列号: c
加载全部内容