JavaScript For Loop
Like this blog? Consider exploring one of our sponsored banner ads...
Here is an example of the JavaScript for loop (which is identical to the PHP for loop). Again I used Prototype. This basic example illustrates hiding multiple divs. So for example if you dynamically generate a page with divs you can show or hide them with an onchange() function call to something like this.
if ($F('validationid').toString() == '18'){ for (i=0; i<=10; i++){ Element.show('subsetList'+i); } }
About this entry
You’re currently reading “JavaScript For Loop,” an entry on BRADINO
- Published:
- 6.6.07 / 1pm
- Category:
- JavaScript
- Tags:
No comments
Jump to comment form | comments rss [?]