JavaScript For Loop
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.
JAVASCRIPT:
-
if ($F('validationid').toString() == '18'){
-
for (i=0; i<=10; i++){ Element.show('subsetList'+i); }
-
}
Home | JavaScript | JavaScript For Loop
You’re currently reading “ JavaScript For Loop ,” an entry on BRADINO
- Published:
- 6.6.07 / 1pm
- Category:
- JavaScript












