Home  >  Article  >  Web Front-end  >  Use JavaScript to select all and delete all when the page does not refresh (GridView)_Form special effects

Use JavaScript to select all and delete all when the page does not refresh (GridView)_Form special effects

WBOY
WBOYOriginal
2016-05-16 18:54:25983browse

/*
全选择*/
function SB002SelectAll()
{
var table = document.getElementById("ctl00_MainContent_grvDevelopKit");
for(var i=1;i

{
var input = table.rows[i].cells[0].getElementsByTagName("input")[0];
input.checked = !this.checked;
}
}
/*
全解除
*/
function SB002UnSelectAll()
{
var table = document.getElementById("ctl00_MainContent_grvDevelopKit");
for(var i=1;i{
var input = table.rows[i].cells[0].getElementsByTagName("input")[0];
input.checked = this.checked;
}
}
Statement:
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