URL: href property - Web APIs | MDN
Value
A string.
Examples
js
const url = new URL(
"https://developer.mozilla.org/en-US/docs/Web/API/URL/href",
);
console.log(url.href); // Logs: 'https://developer.mozilla.org/en-US/docs/Web/API/URL/href'
Specifications
| Specification |
|---|
| URL # dom-url-href |
Browser compatibility
See also
- The
URLinterface it belongs to.