javascript - How to call this function 15 times by for loop? -
i want call function 15 times loop fire on button click please me.
$(function() { $("#btnsave").click(function() { html2canvas($("$widget"), { onrendered: function(canvas) { thecanvas = canvas; document.body.appendchild(canvas); //convert , download image canvas2image.saveaspng(canvas); $("#img-out").append(canvas); //clean //document.body.removechild(canvas) } }); }); });
i want call function 15 times loop fire on button click please me . please
you use simple loop repeat code, recommend being more explicit , using excellent lodash library if can:
_.times(15, function() { // function body run 15 times });
Comments
Post a Comment