|
Mailing Lists
|
Home /
Groups /
Javascript
Loop statements
FOR LOOPIan Skinner 05/06/08 12:40 P Depending on how your form is setup, this might also be relevant...Peter Boughton 05/06/08 01:42 P Okay, so I am really confused about loop statements. For a project I made a personality quiz with 10 questions and each question has 4 different options to choose from. My professor said I have to have loop statements and I don't understand how to do them. Can anyone help me? FOR LOOP for (i=0; i<10; i++) { //loop statements } WHILE LOOP i = 0; while (i<10) { //loop statements i++ } DO WHILE LOOP i = 0; do { / /loop statements i++ } while (i < 10) Depending on how your form is setup, this might also be relevant... InputTags = document.getElementsByTagName('input'); for ( CurTag in InputTags) { // loop statements. } It will loop through all input tags, and allow you to act on each one in turn.
|
May 23, 2013
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||