Latest web development tutorials

HTML DOM Input URL disabled property

Input URL Object Reference Input URL objects

Examples

Disable URL field:

. Document.getElementById ( "myURL") disabled = true;

Output:


try it"

Definition and Usage

disabled property sets or returns the URL field is disabled.

Use the disabled attribute elements are not available and can not be clicked. Disabled elements are usually displayed on the browser gray.

This property reflects the HTML disabled property.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the disabled attribute

Note: Internet Explorer or Safari browser does not support the use of type = "url" attribute of the HTML <input> elements.


grammar

Returns disabled properties:

urlObject .disabled

Set the disabled attribute:

urlObject .disabled = true | false

Property Value

value description
true | false Description URL field is available.
  • true - URL field is unavailable
  • false - default. URL field is available

technical details

return value: Boolean value that, if the URL field unavailable returns true, false otherwise


More examples

Examples

See URL field is available:

var x = document.getElementById ( "myURL") disabled.;
x The output is:
true

try it"

Examples

Disable or enable the URL field:

function disableBtn () {
. Document.getElementById ( "myURL") disabled = true;
}
function undisableBtn () {
. Document.getElementById ( "myURL") disabled = false;
}

try it"


Related Pages

HTML Reference Manual: HTML <the INPUT> Disabled Property


Input URL Object Reference Input URL objects