Home > Web Front-end > JS Tutorial > Js steps to get the content of the selected row in Gridview_javascript skills

Js steps to get the content of the selected row in Gridview_javascript skills

WBOY
Release: 2016-05-16 17:42:20
Original
1559 people have browsed it
Copy the code The code is as follows:

//Get the value of the specified column of the selected row in the gridview
function Select()
{
//Get the element clicked by the mouse
var e=eventsrcElement;
//Get the row number of the row where the element is located (the header row number starts from 0). Note: parentElement is only applicable to IE browser, while parentNode complies with DOM standards.
//var rowIndex=eparentElementparentElementrowIndex;
var rowIndex=eparentNodeparentNoderowIndex;
//Get the GridView control
var gdview=documentgetElementById("<%=gdviewClientID %>");
/ /Get the value of the specified column of the selected row respectively
var value=gdviewrows(rowIndex)cells(column number)innerText;
}

Get the content method of the selected row
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template