If I have a piece of javascript code in my jsp (as shown below):
If var frmObj=document.forms['cseeForm'];
and I did not create a form named cseeForm in that jsp, does the above code means: create a new form called cseeForm? and assign it to frmObj?
Please help, I am maintaining a web application, but I could not find any form object named cseeForm in that jsp.
document.formssimply returns a collection of the forms that currently exist. So, if you haven’t created a form with that name, thenwill simply assign
undefinedtofrmObj; no new form will be created.For more information, check out the relevant MDN page on document.forms