html - javascript - How to get a specific form from a forms array without knowing the number of forms in the page -
i have html page multiple forms:
forms1 forms2 forms3 forms4 . . . formsn
in javascript know can deal specific form forms array:
document.forms[2]
but how can n
form without knowing number of forms?
something that:
n = numbnerofforms document.forms[n] document.forms[n-1]
i think document.form.length
want. returns length of array; in case form array.
note: if , array is:
a ['q','w','e','r','t','y']
array.lenght return 6, useful when nedd cicle via array
for (var = 0; < array.length; i++) { // ... }
Comments
Post a Comment