View Full Version : access 'form'

06-10-2010, 02:15 PM
it is said that the 'form' node can be accessed by document.forms.certainName but it fails on my browser(IE8)
however for images, it works, that is, document.images.certainName returns a Node.

is there bugs only on 'form' tag? btw, document.forms[0] works ...

quite quirky...

06-10-2010, 02:25 PM
you could also try document.formname.elementname

06-10-2010, 03:44 PM
you could also try document.formname.elementname

it doesn't work :(


<form name="theform"><input name="haha">aaa</input></form>
then document.theform.haha throws an exception
(document.forms["theform"] doesn't work,either)

06-17-2010, 06:43 AM
oh i run it before the page is loaded ...

Old Pedant
06-17-2010, 11:58 PM
Can't refer to anything in a <form> until the form is closed with the matching </form> tag.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum