Select All js files, cancel files, and delete files in batches.
Source: Internet
Author: User
// Select all or cancel. // If stype matches, the na parameter is namefunsel sel (stype, na) {for (vari0; I & lt; document. getElementsByName (na ). length; I ++) {if (stype & amp; #39; all & amp; #39;) document. getElementsByNam // select all and cancel
// Choose "na" as "name" for stype matching.
Function Sel (stype, na ){
For (var I = 0; I <document. getElementsByName (na). length; I ++ ){
If (stype = 'all') document. getElementsByName (na) [I]. checked = true;
Else document. getElementsByName (na) [I]. checked = false;
}
}
// Batch Delete
// Na is name
Function checkSubmit (na, url)
{
Var str = '';
For (var I = 0; I <document. getElementsByName (na). length; I ++)
{
If (document. getElementsByName (na) [I]. checked ){
If (str = '') str + = document. getElementsByName (na) [I]. value;
Else str + = ',' + document. getElementsByName (na) [I]. value;
}
}
If (str = '')
{
Alert ('You didn't select any content! ');
Return false;
}
Else
{
Location = url + "? Id = "+ str +" & action = delall ";
}
}
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.