Easy Tutorial
❮ Jsref Regexp Nxy Jsref Isfinite ❯

Location href Attribute


Definition and Usage

The href attribute is a read-write string that can set or return the complete URL of the currently displayed document.

Syntax


Browser Support

All major browsers support the href attribute.


Example

Return the complete URL (current page):

The output of the above example:


❮ Jsref Regexp Nxy Jsref Isfinite ❯