Latest web development tutorials

HTML DOM Input URL value property

Input URL Object Reference Input URL objects

Examples

Modify the value of the URL field:

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

try it"

Definition and Usage

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

value attribute describes the value entered by the user or a script or a default value entered value.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support attribute value

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


grammar

Returns the value property:

urlObject .value

Set the value property:

urlObject .value = URL

Property Value

value description
URL It describes an absolute URL address (such as: "http://www.w3cschool.cc")

technical details

return value: Value string representing the URL field


More examples

Examples

Get value of the URL field:

var x = document.getElementById ( "myURL") value.;
x The output is:
http://www.w3big.com

try it"


Related Pages

HTML Reference Manual: HTML <the INPUT> value The property


Input URL Object Reference Input URL objects