The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
href property
Sets or retrieves the entire URL as a string.
Syntax
| JavaScript | |
|---|
Property values
Type: String
a URL.
Standards information
- Document Object Model (DOM) Level 1 Specification, Section 2.5.5
Examples
This example shows a URL list. The user is taken to the URL selected from the options, if the selection is different from the list's default value.
<select onchange="javascript:window.location.href = this.options[this.selectedIndex].value;"> <option value="http://www.microsoft.com/ie">Internet Explorer</option> <option value="http://www.microsoft.com">Microsoft Home</option> <option value="http://msdn.microsoft.com">Developer Network</option> </select>
See also
Show: