What is a form object?

Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.

What is a form object?

Rating:

A form and its elements are two-way gateways between users and JavaScript programs. The form elements are the only way with which users can feed textual information or select an item from a list of items. Users can send their information with the help of forms to the Web server. A form object must take the reference of the document object; otherwise, it will result in an error.

There are two ways of accessing a form object, which are as follows:

  1. form name

  2. form array

  3. getElementById() method of the document object

For example, if a user creates a form by using the form tag and names the form as form1, he can then access the form in the following two ways:

  1. document.form1

  2. document.forms[0]

If the ID of the form is myform, the form can be accessed in the following way:

mydocform=document.getElementById("myform")


Rating:



Other articles

Click here to Article home

 
uCertify.com | Our Company | Articles | Privacy | Security | Contact Us | News and Press Release | uCertify India
MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD Cisco Certification: CCNA, CCENT, A+, Network+, Security+
Oracle Certification: OCP 9i, OCP 10g, OCA 9i, OCA 10g CIW foundation    EC-212-32    CISSP    Photoshop ACE    Adobe Flash ACE
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.