name=new Array() name[0]="Smith"; name[1]="Jones"; name[2]="Doe" |
name=new Array("Smith", "Jones", "Doe") |
<script> imag=new Array("URL1","URL2","URL3","URL4") capt=new Array("Note1","Note2","Note3", "Note4"); num=imag.length;ct=0;ct=0; function strt() {ct=ct+1;pic=imag[ct-1]; document.img1.src=pic; window.document.display.caption.value=capt[ct-1]; if(ct ==nimag){ct=0;}} </script> <form name="display"> <img src="URL1" name="img1"><input type="text" name="caption" readonly="readonly"> <input type="button" value="Go" onClick="strt()"> </form> |
for(i=0; i < noelem; i++) {if(i=itemWanted){break};} |
for(i=0; i < noelem; i++) { for(j=0; j < 10000; j++) {continue} } |
<script> <!-- HIDE THE SCRIPT FROM OTHER BROWSERS JavaScript program // STOP HIDING FROM OTHER BROWSERS --> </script> |
<script> function trans() { /* Get Sentence Input */ start=window.document.sent.text.value; /* Make Upper Case as is Stored String */ start=start.toUpperCase(this); /* No. Characters in Input */ nchar=start.length; /* Stored Strings */ / / Normal Alphabet; var abc="QWERTY..."; / / Alt-Alphabet; var alt="朕®þ¥..."; /* Length of Each Stored String */ abcln=abc.length;altln=alt.length; /* Initialize Output String(s) */ var eng=" ";var sans=" "; /*Scan For Each Character Input */ for(i=1; i <= nchar; i++) { chct=start.substring(i-1,i); /* Check against Alphabet */ for(j=1; j <= abcln; j++) { alchr=abc.substring(j-1,j); if(alchr == chct) {sans=sans+alt.substring(j-1,j);break} } } /* Output Result */ window.document.sent.lang.value=sans} </script> <form name="sent"><input type="text" name="text"><input type="button value=Tell Me" onClick="trans()"> <textarea name="lang" cols=20 rows=7 nohighlight> </textarea> <input type="reset" value="Clear"> |
JS Test-Bed 1 - - JS Test-Bed 2
<< Previous | Next >> |