javascript - Anonymous function warning -
i have problem on code , don't know how fix it. write "important here" console tell me function(e) anonymous. how can resolve problem?
(function() { var theform = document.getelementbyid('theform'), inputs = document.queryselectorall('input[type=text]'), inputslength = inputs.length; (var = 0; < inputslength; i++) { inputs[i].addeventlistener('keyup', function(e) { check[e.target.id](e.target.id); }); } theform.addeventlistener('submit', function(e) { //important here var result = true; (var in check) { result = check[i](i) && result; } if (result) { alert('le formulaire est bien rempli.'); } e.preventdefault(); }); theform.addeventlistener('reset', function() { (var = 0; < inputslength; i++) { inputs[i].classname = ''; } deactivatetooltips(); }); })();
Comments
Post a Comment