Input Submit form Attribute
Definition and Usage
form
The property returns a reference to the form containing the submit button.
This property returns the form object upon success.
Note:This property is read-only.
Example
Return the id of the form containing the <input type="submit"> element:
var x = document.getElementById("mySubmit").form.id;
Syntax
submitObject.form
Technical Details
Return Value: |
Reference to the form element containing the submit button. If the submit button is not in the form, it returns |
---|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |