/ Published in: JavaScript
Use:
foreach([ document.getElementById('pole1'), document.getElementById('pole2'), document.getElementById('pole3') ], function(obj){ obj.style.borderColor = 'green'; });
Expand |
Embed | Plain Text
function foreach(array, callback){ for(var i=0; i<array.length; ++i){ callback(array[i]); } }
You need to login to post a comment.
