How can I iterate through all forms in a document using javascript?
Here's an example using the document.forms instead of getElementsByTagName().
As with the getElementsByTagName() example this goes through all the forms and does a popup alert with the action (instead of name, as it is more likely to be set).
var formsCollection;
var r;
formsCollection=document.forms;
for(r=0;r
This can be condensed down and of course the popup changed to something useful but I have tried to keep it simple.
And for reference here are some links to more info: