About the each loop in jquery and the jqueryeach Loop

Source: Internet
Author: User

About the each loop in jquery and the jqueryeach Loop

QQ: 1187362408 welcome to technical exchanges and learning

Each loop in jquery ):

TODO:

1. The for loop has been used for a long time, and there will be a new look in the other way;

2. the actual use of the each loop project is as follows:

<Span style = "color: #000000;"> $ (function () {$. each (chkNameArray, function (value, idex) {// RequiredCheckbox (idex); // index RequiredCheckbox (chkNameArray [value]); // name });}); function ProQuery (ddlName, chkId) {$. each (chkProQuery, function (value, idex) {if (ddlName = idex) {$ ("[id ^ =" + chkId + "]"). each (function () {if ($ ("[id =" + ddlName + "]"). val () = "2") {// clear $ (this ). attr ('checked', false );} Else if ($ ("[id =" + ddlName + "]"). val () = "0") {// select all $ (this ). attr ('checked', 'checked');} else if ($ ("[id =" + ddlName + "]"). val () = "1") {// returns $ (this ). attr ("checked ",! This. checked) ;}}}}) ;}</span>

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.