Easy Tutorial
❮ Met Node Isdefaultnamespace Prop Audio Loop ❯

Input URL value Attribute

Input URL Object

Example

Modify the value of the URL field:

document.getElementById("myURL").value = "http://www.google.com";

Definition and Usage

The value attribute is used to set or return the value of the URL field.

The value attribute describes the user input value, default value, or script input value.


Browser Support

All major browsers support the value attribute.

Note: Internet Explorer or Safari browsers do not support the HTML <input> element with the type="url" attribute.


Syntax

Return the value attribute:

Set the value attribute:

Attribute Values

Value Description
URL Describes an absolute URL address (e.g., "http://www.w3cschool.cc")

Technical Details

| Return Value: | String, representing the value of the URL field | | --- | --- |


More Examples

Example

Get the value of the URL field:

var x = document.getElementById("myURL").value;
http://www.tutorialpro.org

Related Pages

HTML Reference: HTML <input> value Attribute


❮ Met Node Isdefaultnamespace Prop Audio Loop ❯