Select All/deselect the whole thing.

Source: Internet
Author: User

It took me half a day to deal with the checkbox Select All/Cancel the whole selection.

Technical field Trusted ComputingOther Select All Application Date 20002001200220032004200520062007200820092010201120122013201420152016Years to2000200120022003200420052006200720082009201020112012201320142015So farYears
Patent type Invention PatentFull selection of utility models Authorization Date 20002001200220032004200520062007200820092010201120122013201420152016Years to2000200120022003200420052006200720082009201020112012201320142015So farYears
State has been authorizedSelect All in the application Keyword search (name, patent number)

  

function Selectallcondition ($name) {
var chks = $ ("input[name=" + $name + "']");
var srcelement = event.srcelement;
if (srcelement.innerhtml = = "Deselect All") {
Srcelement.innerhtml= "Select All";
for (Var i=0;i<chks.length;i++) {
if (chks[i].tagname== ' INPUT ')
Chks[i].setattribute ("Checked", "" ");
}
}else{
Srcelement.innerhtml= "Cancel all selection";
for (Var i=0;i<chks.length;i++) {
if (chks[i].tagname== ' INPUT ')
Chks[i].setattribute ("Checked", "true");
}
}

}

When I write this, when I click Cancel the selection, but not a little reaction, so spent the whole afternoon to deal with this problem, finally solved

function Selectallcondition ($name) {
var chks = $ ("input[name=" + $name + "']");
var srcelement = event.srcelement;
if (srcelement.innerhtml = = "Deselect All") {
Srcelement.innerhtml= "Select All";
for (Var i=0;i<chks.length;i++) {
if (chks[i].tagname== ' INPUT ')
Chks[i].checked=false;
}
}else{
Srcelement.innerhtml= "Cancel all selection";
for (Var i=0;i<chks.length;i++) {
if (chks[i].tagname== ' INPUT ')
Chks[i].checked = true;
}
}

}

Technical field Trusted ComputingOther cancellations Select all Application Date 20002001200220032004200520062007200820092010201120122013201420152016Years to2000200120022003200420052006200720082009201020112012201320142015So farYears
Patent type Invention PatentThe utility model cancels the full selection Authorization Date 20002001200220032004200520062007200820092010201120122013201420152016Years to2000200120022003200420052006200720082009201020112012201320142015So farYears
State has been authorizedCancel the full selection in the application Keyword search (name, patent number)

Select All/deselect the whole thing.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.