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>