Easy Tutorial
❮ Event Onsearch Met Canvas Beginpath ❯

Input URL required Attribute

Input URL Object

Example

Check if the URL field is a required field before submitting the form:


Definition and Usage

The required attribute is used to set or return whether the URL field is a required field in the form.

This attribute reflects the HTML required attribute.


Browser Support

All major browsers support the required attribute, except Internet Explorer 9 and earlier versions, and Safari.


Syntax

Return the required attribute:

Set the required attribute:

Attribute Values

Value Description
true|false Describes whether the URL field is a required part of the form before submission. true - The URL field is a required part of the form. false - Default. The URL field is an optional part of the form.

Technical Details

| Return Value: | Boolean, returns true if the URL field is a required part of the form, otherwise returns false. | | --- | --- |


More Examples

Example

Set the URL field as a required part of the form:


Related Pages

HTML Reference: HTML <input> required Attribute


❮ Event Onsearch Met Canvas Beginpath ❯