Skip to content
Related Articles

Related Articles

HTML | DOM Object form Property

Improve Article
Save Article
  • Difficulty Level : Basic
  • Last Updated : 25 Aug, 2022
Improve Article
Save Article

The DOM Object form Property in HTML DOM is used to set or return the value of the form attribute of an <object> element. The form attribute is used to specify the one or more forms the <object> will contain. 


  • It returns the form property.
  • It is used to set the form property:
objObject.form = form_id

Property Values: It contains the value i.e form_id that specifies the number of <form> element that an Object contains. 

Return Value It returns a string value which represents the one or more form element that belongs to an Object. 

Example: This Example returns a form Property. 


<!DOCTYPE html>
        <object id="myobject"
        <h2>DOM Object form Property</h2>
        <form id="myGeeks">
            <input type="text">
        <button onclick="Geeks()">
            Click it
        <p id="gfg"
        function Geeks() {
            // Return Object form Property
            var x =
                "gfg").innerHTML = x;


Before Clicking On Button:


After Clicking On Button:


Supported Browsers: The browser supported by DOM Object form Property are listed below:

  • Chrome
  • Firefox
  • Safari
  • Internet Explorer
  • Opera

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!